知名前端框架 HTML5 Boilerplate 的作者在 GitHub 上建立了一份詳細的「HTML5 在行動裝置支援情況」文檔,涵蓋 iOS Safari、Android Browser、Chrome for Android、Firefox Mobile、IE Mobile、Opera Mobile 等主流行動瀏覽器對 HTML5、CSS3、JavaScript API 的支援程度,是行動端開發的重要參考依據。
| 類別 | 重點檢測項目 |
|---|---|
| 語義標籤 | header, footer, article, section, nav, aside, figure, figcaption |
| 表單增強 | input types (date, email, url, number...), validation, placeholder, autofocus |
| 多媒體 | video, audio, track, WebM/H.264 編碼支援 |
| Canvas/WebGL | 2D context, WebGL 1/2, requestAnimationFrame |
| 儲存 API | localStorage, sessionStorage, IndexedDB, Cache API |
| 離線應用 | Application Cache (已棄用), Service Worker, Manifest |
| 裝置 API | Geolocation, Device Orientation, Touch Events, Vibration API |
| 通訊 API | WebSocket, Server-Sent Events, WebRTC, Fetch API |
| CSS3 模組 | Flexbox, Grid, Transitions, Animations, Media Queries, Viewport units |
'feature' in window 判斷。<meta name="viewport">,觸控目標 ≥ 44×44px,避免 :hover 陷阱。