touch-action kiểm soát cách browser xử lý touch gestures.
none: vô hiệu hóa hoàn toàn zoom và scroll — dùng cho canvas drawing, games, custom gesture handlersmanipulation: chỉ cho phép pan và pinch-zoom, disable double-tap zoom — loại bỏ 300ms click delay trên mobilepan-x: chỉ scroll ngangpan-y: chỉ scroll dọcpinch-zoom: chỉ cho phép zoom
Quan trọng cho các UI tương tác nhiều trên touch devices.
touch-action controls how the browser handles touch gestures on an element. touch-action: none disables all zooming and scrolling — suitable for canvas drawing, games, or custom gesture handlers. manipulation allows only pan and pinch-zoom, disabling double-tap zoom — this removes the 300ms click delay on mobile, making buttons and links feel more responsive.
- Other values include
pan-x(horizontal scrolling only),pan-y(vertical only), andpinch-zoom(zoom only). - An important property for touch-heavy interactive UIs.