programer-xinmu78

CSS的三类选择器
1、css-css的基本选择器(三种)
要对哪个标签里面的数据进行操作
(1)标签选择器
div {
background-color:red;
color:blue;
}

(2)class选择器

  • 每个HTML标签中都有一个属性 class
愿有岁月可回首,且以深情共白头!
.haha { background-color:blue; }

(3)id选择器

  • 每个HTML标签中都有一个属性 id
愿有岁月可回首,且以深情共白头!
#hehe { background-color:blue; }

*** 基本选择器的优先级
style > id选择器 > class选择器 > 标签选择器

分类:

技术点:

相关文章:

  • 2021-10-07
  • 2022-12-23
  • 2021-05-24
  • 2021-12-29
  • 2021-12-03
  • 2021-07-22
  • 2021-11-17
  • 2021-12-16
猜你喜欢
  • 2021-12-05
  • 2021-08-05
  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案