0731-84469346 / 152-7483-9229
更新时间:2015年10月21日

Types of Selectors in CSS

CSS commands are usually grouped in the curly braces to make a set of rules. Following are the various ways available to attach these set of rules with HTML code.

Selector (in simple words) means how you name these set of rules.

1 CLASS SelectORS

Class selectors is the simplest form of selectors where you assign your own meaningful name to the set of CSS rules. To create a class selector you simply need to write name of the class followed by a period.
(A class name cannot start with a number or a symbol as it is not supported by various browsers.)
For example,

Types of Selectors in CSS Example Source Code [www.52css.com]

上一篇: 浅析CSS clip属性
下一篇:CSS中背景background的一些语法