概述
html5标签属性ref
What if I told you that it was possible for you to make an HTML attribute with any name you wanted, set to any value, while always being assured that it was valid code?
如果我告诉过您,可以始终确保它是有效的代码,那么可以使用所需的任何名称,设置为任何值来创建HTML属性怎么办?
“Silly Dudley!” you might say. “That’s impossible! I know HTML5 is a lot looser than earlier versions of the language, but it’s not freeform poetry! You can’t just make up your own attributes!”
“傻傻的达德利!” 你可能会说。 “这不可能! 我知道HTML5比该语言的早期版本宽松得多,但它不是自由形式的诗歌! 您不能仅仅弥补自己的属性 !”
Actually, you can. There are just two conditions:
其实可以。 只有两个条件:
The attribute name has to start with
data-
属性名称必须以
data-
开头-The name you use has to follo
最后
以上就是震动面包为你收集整理的html5标签属性ref_HTML5数据标签和属性的全部内容,希望文章能够帮你解决html5标签属性ref_HTML5数据标签和属性所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复