类似于JAVA导入包,利用语句:@import url(“包名”);
packet.css:
*{
margin: 0;
padding: 0;
}
h1{
background-color: red;
}
being used.css:
@import url("packet.css");
practice.html:
<link rel="stylesheet" type="text/css" href="css/being used.css"/>
<body>
<h1>Hello World!</h1>
</body>
效果图: