<html>
<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>內嵌屬性 - www.tw511.com</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h1>內嵌屬性範例</h1>
<p class="line">SASS stands for Syntactically Awesome Stylesheet</p>
</div>
</body>
</html>
接下來產生一個檔案:style.scss.
.line { font: { family: Lucida Sans Unicode; size:20px; weight: bold; variant: small-caps; } }
sass --watch C:\Ruby22-x64\style.scss:style.css
.line { Lucida Sans Unicode; font-size: 20px; font-weight: bold; font-variant: small-caps; }
在瀏覽器中開啟這個HTML檔案,輸出顯示如下。