基本选择器

1.id选择器
/*id选择器*/
#d1 { /*找到id是d1的标签*/
  color: green;
}
2.类选择器
/*类选择器*/
.c1 { /*找到class值里包含c1的标签*/
  color: red;
}
3.元素(标签选择器)
/*(元素)标签选择器*/
span { /*找到所有的span标签*/
  color: red;
}
4.通用选择器
/*通用选择器*/
* { /*将html页面上所有的标签全部找到*/
  color: green;
}

 






posted @ 2023-10-09 20:53  wellplayed  阅读(16)  评论(0编辑  收藏  举报