Home > Web Front-end > H5 Tutorial > body text

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

WBOY
Release: 2016-05-17 09:10:05
Original
2402 people have browsed it

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!