在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 教程/ HTML/ Sass注釋
Sass @debug指令
Sass @each指令實例
Sass @import指令
Sass SassScript &符號
Sass操作符
Sass多行注釋插值法
Sass if()函數(shù)
Sass @規(guī)則和指令
Sass through關(guān)鍵字
傳遞內(nèi)容塊到Mixin
Sass @media指令
Sass @warn指令
Sass嵌套規(guī)則
Sass @error指令
Sass @if指令實例
Sass變量
擴(kuò)展Sass
Sass嵌套屬性
Sass @at-root指令
Sass @for指令
Sass @extend指令
Sass CSS擴(kuò)展
Sass語法
Sass @if指令
Sass占位符選擇器
Sass 定義Mixin
Sass括號混合
SASS教程
Sass布爾運算符
Sass引用父選擇器
Sass @else if指令
Sass數(shù)據(jù)類型
Sass數(shù)字運算符
Sass to關(guān)鍵字
Sass @each多重分配與映射
Sass顏色運算符
Sass交互式shell
Sass控制指令&表達(dá)式
Sass的使用
Sass混入指令
Sass腳本
Sass插值
Sass安裝
Sass函數(shù)指令
Sass @each多重分配
Sass @each指令
Sass變量默認(rèn)值
Sass包含mixin
Sass注釋
Sass @while指令
Sass Mixin參數(shù)
Sass字符串運算符
Sass函數(shù)
Sass輸出樣式

Sass注釋

在本章中,讓我們學(xué)習(xí)有關(guān)SASS的注釋。注釋是放置在源代碼中不可執(zhí)行的語句。注釋使源代碼更易于理解。SASS支持兩種類型的注釋。

  • 多行注釋 - 這些使用 /*和*/ 寫入。多行注釋都保留在CSS輸出。
  • 單行注釋 - 這些是使用//跟著注釋。單行注釋不會保留在CSS輸出。

實例

下面的例子演示了SCSS 文件中使用注釋:
<html>
<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>SASS注釋 - www.yiibai.com</title>
   <link rel="stylesheet" type="text/css" href="style.css"/>
</head>
<body>
  <h1>Welcome to YiiBai</h1>
  <a >Yiibai Yiibai</a>
</body>
</html>

接下來創(chuàng)建一個文件:style.scss.

style.scss

/* This comment is
 * more than one line long
 * since it uses the CSS comment syntax,
 * it will appear in the CSS output. */
body { color: black; }

// These comments are in single line
// They will not appear in the CSS output,
// since they use the single-line comment syntax.
a { color: blue; }
可以告訴SASS監(jiān)視文件,并隨時使用下面的命令更新SASS文件修改CSS:
sass --watch C:\Ruby22-x64\style.scss:style.css
接著執(zhí)行上面的命令,它會自動創(chuàng)建style.css文件,如下面的代碼:

style.css

/* This comment is
 * more than one line long
 * since it uses the CSS comment syntax,
 * it will appear in the CSS output. */
body {
  color: black; }

a {
  color: blue; }

輸出

讓我們來執(zhí)行以下步驟,看看上面的代碼輸出:
  • 保存上面的html代碼在 sass_comments.html 文件。
  • 在瀏覽器中打開該HTML文件,得到輸出結(jié)果如下。

要學(xué)習(xí)有關(guān)多行注釋中的插值,單擊此鏈接.


上一篇:Sass包含mixin下一篇:Sass顏色運算符