CSS样式表:

嵌套:body是最外层包围其他所有HTML元素(标签),其中的元素样式都可覆盖body的样式。

覆盖:同一元素有多个样式,位置靠后的样式覆盖位置靠前的样式。

id:id与位置无关,可任意覆盖class样式。

内联样式:元素属性style比class和id样式优先级都高。

!important:标注为!important的样式是此属性的最高优先级样式。

CSS颜色不同表示方法

字母 Red blue orange

十六进制表示法 #FF0000 Red

RGB表示法 rgb(0,0,0)black rgb(255,0,0)红色

Bootstrap

<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"/>

Font Awesome:

<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"/>

相关文章:

  • 2021-11-29
  • 2021-08-29
  • 2022-01-04
  • 2021-09-10
  • 2021-12-29
  • 2022-02-19
  • 2022-12-23
  • 2021-08-02
猜你喜欢
  • 2021-11-17
  • 2021-05-01
  • 2021-08-01
  • 2022-12-23
  • 2021-04-28
  • 2021-10-07
  • 2021-07-18
相关资源
相似解决方案