jquery选择器

来源:互联网 发布:网络赚钱渠道 编辑:程序博客网 时间:2024/06/18 15:19


下面先来复习下css选择器

1.The id Selector

Example

#para1
{
text-align:center;
color:red;
}
注意:Do NOT start an ID name with a number! 

2.The class Selector

In the example below, all HTML elements with class="center" will be center-aligned:

Example

.center {text-align:center;}
You can also specify that only specific HTML elements should be affected by a class.

Example

p.center {text-align:center;}


原创粉丝点击