1
id选择器和类选择器
source link: https://blog.51cto.com/u_15858801/5860938
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
id选择器和类选择器
精选 原创类选择器:
类命名规则:
样式点定义,结构类(class)调用,一个或多个,开发最常用。
各个类名中间用空格隔开。
id选择器:样式#,结构是id,只能调用一次,别人切勿使用。
这张图片的写法是错误的:
id选择器只能调用一次。
id选择器和类选择器的不同之处在于:
1.id选择器相当于人的身份证号码,而类选择器相当于人的姓名,姓名可以重复,身份证号码全国唯一。
下边的写法是正确的:
标注:font-size 是调整字体大小的。
- 赞
- 收藏
- 评论
- 分享
- 举报
上一篇:求矩形正、副对角线之和
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK