Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
html5 新技术
Search
hugo
November 27, 2013
Programming
3
170
html5 新技术
主要介绍了html的一些新增属性和api
hugo
November 27, 2013
Tweet
Share
More Decks by hugo
See All by hugo
CSS命名及书写规范
baofen14787
0
640
移动端性能调优及16ms优化
baofen14787
1
2.2k
html5 新技术 2
baofen14787
1
130
html5 新技术 3
baofen14787
1
94
Other Decks in Programming
See All in Programming
大規模UIKitベースアプリへのTCAの段階的導入/gradual-adoption-of-tca-in-a-large-scale-uikit-based-app
takehilo
1
180
try!Swift Tokyo 2024 参加報告 LT
akidon0000
1
220
スクラムガイドのスプリントレトロスペクティブを改めて読みかえしてみた / Re-reading the Sprint Retrospective Section in the Scrum Guide
mackey0225
3
430
PostmanでAPIの動作確認が楽になった話
h455h1
0
170
FigmaとPHPで作る1ミリたりとも表示崩れしない最強の帳票印刷ソリューション
ttskch
43
19k
Zero Waste, Radical Magic, and Italian Graft – Quarkus Efficiency Secrets
hollycummins
0
230
Scalable Customer Journey Orchestration (CJO)
lewuathe
0
330
SwiftUIで使いやすいToastの作り方 / How to build a Toast system which is easy to use in SwiftUI
lovee
3
150
見た目から始める生産性向上
ikumatadokoro
7
840
Netty Chicago Java User Group 2024-04-17
sullis
0
180
二郎系ラーメンのコールで学ぶ AST 解析
memory1994
PRO
7
1.7k
Node.js v22 で変わること
yosuke_furukawa
PRO
9
3.4k
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
267
39k
The Power of CSS Pseudo Elements
geoffreycrofte
60
5k
What’s in a name? Adding method to the madness
productmarketing
PRO
16
2.6k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
7
1k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
30
6k
The Art of Programming - Codeland 2020
erikaheidi
42
12k
Large-scale JavaScript Application Architecture
addyosmani
504
110k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
9
8.3k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
244
20k
Designing with Data
zakiwarfel
96
4.8k
For a Future-Friendly Web
brad_frost
172
9k
The Invisible Side of Design
smashingmag
294
49k
Transcript
HTML5新技术(1) hugohua
data-*** 符合html5规范 高级浏览器支持 js提供dataset方法 jq提供data方法
CSS提供attr() 方法
dataset *带连字符连接的名称在使用的时候需要命名驼峰化
$(‘’).data() *data方法,页面初始化时缓存数据,后续无法修改属性值。 参考文献: http://www.learningjquery.com/2011/09/using-jquerys-data-apis
CSS attr() DEMO
Demo
datalist *扩展阅读: http://www.zhangxinxu.com/wordpress/2013/03/html5-datalist-实际应用-可行性/
download
download Download属性:表明一个资源是让用户下载的,而不是立即显示的。 Download如果存在值,则这个值是文件名。 DEMO
下载动态生成的文件 可以通过Bob创建二进制文件,然后用这个属性下载到本地。
autofocus Autofocus:页面加载时自动地获得焦点。 仅对 input、button、textarea等表单元素有效 多个autofocus存在时,作用于最后一个 DEMO
placeholder 文本框默认文字提示 默认颜色在各浏览器下表现不一致,建议通过CSS重置样式 DEMO
Context Menus Chrome暂不支持 DEMO
None
HTML5 JS API • 未完待续 • 3Q