文件擴(kuò)展名為 .css
文件名以 http:// 開(kāi)始
文件名是 url()
@import 構(gòu)成任何媒體查詢
@import "style.css"; @import "http://www.yiibai.com/bar.css"; @import url(style); @import "style" screen;
sass --watch C:\Ruby22-x64\style.scss:style.css
@import url(style.css); @import "http://www.yiibai.com/bar.css"; @import url(style); @import "style" screen;
偏導(dǎo)是其中使用下劃線(_partials.scss)開(kāi)頭SASS或SCSS文件名稱。該部分文件名可以在SASS文件中,而無(wú)需使用下劃線導(dǎo)入。SASS不會(huì)編譯CSS文件,但使用下劃線,這不僅使得SASS了解到局部的不會(huì)生成CSS文件。
.container
{
background: #ffff;
}
h4 {
@import "example";
}
h4 .container {
background: #ffff; }
@import 'stylesheet'
<html>
<head><meta charset="UTF-8"> <title>Import指令示例 - www.yiibai.com</title>
<link rel="stylesheet" type="text/css" href="style.css"/>
</head>
<body class="container">
<h1>@Import指令示例</h1>
<h4>Import the files in SASS</h4>
<ul>
<li>Red</li>
<li>Green</li>
</ul>
</body>
</html>
ul{
margin: 0;
padding: 1;
}
li{
color: #680000;
}
@import "partial";
.container
{
background: #ffff;
}
h1
{
color: #77C1EF;
}
h4
{
color: #B98D25;
}
sass --watch C:\Ruby22-x64\style.scss:style.css
ul {
margin: 0;
padding: 1; }
li {
color: #680000; }
.container {
background: #ffff; }
h1 {
color: #77C1EF; }
h4 {
color: #B98D25; }