css引入方式和基本样式

css的三种引入方式:

  1.内嵌:直接在标签中添加style属性

    格式:<标签名 style="样式1:样式值1;样式2=样式值2;"></标签名>

  2.内联:在head标签中添加style中

 id选择器:

#id值,.class值,元素选择器(标签名),关系选择器(并列关系和父子关系)

选择器优先级

id选择器>class选择器>元素选择器>关系选择器

  3.外部引入

  需要创建一个xxx.css文件

  在head标签中添加link标签  <link href="xxxx.css ">

引入方式优先级:内嵌>内联>外部引入

css基本样式:

  font-size,font-weight,font-style

  color

  text-decoration: overline;(取消下划线)text-indent:2em(首行缩进)text-align:center

  line-height

  border-style------------------------------------dashed:虚线      dotted:点线        solid:实线

框架标签:

<iframe src=引八页面的地址”frameborder= "0无边框1有边框"width= "宽度"height= "高度"name= "给框架起个名字"></iframe>

原文地址:https://www.cnblogs.com/haoduoyu0512/p/12902118.html