WEB编程---CSS

CSS:层叠样式表

 

把样式表和 HTML 关联有三种方式

1.内联样式

<p style="font-size:25pt; font-weight:bold; font-style:italic; color:red;">

2.嵌入样式

写在 head 元素的 style 中

3.链接样式表

链接到.css

<link href="" rel="stylesheet" type="text/css">

.css

body {
      background-color: yellow; 
}
p {
      color:blue  
}

 

样式规则=选择器+声明器

h1{

  color=blue;

  font-size:12px

}

span {

  font-weight: bold;

  font-size: larger;

}

#special(id){

  ...

}

 

posted @ 2022-03-04 08:54  liankewei123456  阅读(39)  评论(0编辑  收藏  举报