Home  >  Article  >  Web Front-end  >  HTML5中对class属性的解释与规定

HTML5中对class属性的解释与规定

WBOY
WBOYOriginal
2016-05-17 09:10:052402browse

每个元素都可以设置class属性。
如果一个元素属于多个class,用空格隔开,例如&a href=”http://www.htmlv.cn/”&html5&/a&。
设置有class属性值的元素,可以被css中的选择器调用,也可以在DOM中以getElementsByClassName()方法调用。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn