Class Selector in CSS

Class Selector in CSS

A class selector in CSS starts with a dot (.). A class selector selects all elements with a matching class attribute.

You can give a class any name that starts with a letter, hyphen (-), or underscore (_). You can use numbers in class names, but a number can’t be the first character or the second character after a hyphen.

An element can have more than one class. An element with multiple classes is styled with the CSS rules for each class. You can also combine multiple classes to select elements.

要查看或添加评论,请登录

Milap Patel的更多文章

社区洞察

其他会员也浏览了