匯入外部CSS方法

來源:互聯網
上載者:User
Code
第一種方式
<link rel="stylesheet" type="text/css" href="3-1.css" />
第二種方式
<style type="text/css" >
@import"3-1.css";
</style>
內部樣式表
<style type="text/css" >

h1,h2,h3,h4,p{
    color:#F00;
    font-family:"Comic Sans MS", cursive;
}

</style>

內嵌樣式表
<p style="background-color:#0FF; margin-left:4px; background-repeat:repeat-x">內嵌入CSS</p>

Code
CSS
1、內建樣式
[1]、<style type="text/css">
</style>
[2]、
<style type="text/css">
@import url("css/layout.css");
</style>
2、行內樣式
<a href="#" style="color:#C00">this</a>
3、連結樣式
<link href="css/myjob.css" rel="stylesheet" type="text/css" />

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.