首页 > Web开发 > 详细

css选择器

时间:2017-10-16 14:43:06      阅读:274      评论:0      收藏:0      [点我收藏+]

引入外部css:<head> <link rel="stylesheet" type="text/css" href="mystyle.css"> </head>

ID:#id

CLASS:.class

p.class p标签使用.class类的元素。

背景:background

当使用简写属性时,属性值的顺序为::

  • background-color
  • background-image
  • background-repeat
  • background-attachment
  • background-position

div p:后代选取器(以空格分隔)

div>p:子元素选择器(以大于号分隔)

div+p:相邻兄弟选择器(以加号分隔)

div~p:普通兄弟选择器(以波浪号分隔)

p:first-child:第一个子类选择器

CSS伪类:

https://www.w3cschool.cn/css/css-pseudo-classes.html

css选择器

原文:http://www.cnblogs.com/swordyt/p/7676598.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!