Html中设置CSS样式分为3类,分别是内嵌式,嵌入式,和外部式
内联式:<p style="color:red"></p>
嵌入式:<style type="text/css">
p{
color:red
}
</style>
外部式:css部分写在css单独的文件中,html文件调用时:<link href="xx.css" rel="stylesheet" type="text/css" />,其中href为css文件名,rel="stylesheet" type="text/css" 固定不可修改。
扫描二维码关注公众号,回复:
5803005 查看本文章
其中优先级内联式>嵌入式>外部式(3个都有设置一样的权值,则文字的样式只展示内联式的样式)