css样式

框架(frameset):需把body删除 <frameset row="300px,*" frameborder="">    /*上边像素300,下边剩余(cols左右拆)   

<farme src="(html)" />    <frame src="(html)" scrolling="yes" />   /*scrolling滚动条 </frameset>

iframe: <iframe src="" width="" height="" frameborder=""> </iframe>

css样式表:   <span style="color:red;">      <h2 style="</h2>   </span>

<style type="text/css">       /*标签选择器     div{300px;         height:100px;         font-family:"楷体";         font-size:50px;       }                      /*所有div都遵循 </style>

class选择器 .pp{    background-color:green;    border:1px soild red dashed;    /*边框颜色 实线虚线    } .pp2     font-size:100px;     } <p class="pp pp2"></p>

id选择器:  #div1{       500px;      }   <div id="div1">ttl</div>

引用CSS文件:   <link rel="stylesheet" type="text/css" href="css/style.css" />  css里不需要写<style type="text/css">

*{   margin:0px;         /*内边距   padding:0px;        /*外边距  }

子代选择器:   .pp td{         border:1px black solid;        }

并列选择器:   #div1,.pp{            color:greenyellow;           }

点筛选:   div.div1{            font-size:100px;          }

<div class="bg-style>         background-image:背景图

background-size:改图片尺寸

background-repeat:平铺样式

background-position:位置

font-family    font-size   color     font-style:italic倾斜     font-weight:bold加粗      text-decoration:underline下划线

text-align:center    line-height:div的总高度    text-indent:总体缩进

有序<ol type="  "><li></li></ol>

无序<ul type="  "><li></li></ul>

margin 外边距          padding内边距

原文地址:https://www.cnblogs.com/hljj/p/6696480.html