較低飽和度通道用於提取 HSL 顏色空間中的顏色對象。編譯後隻顯示飽和值。
飽和函數示例
下麵舉個例子來演示一下Less文件中飽和度顏色通道的用法。
創建名為 "simple.html" 的 HTML 文件,其中包含以下數據。
HTML 文件:simple.html
<!DOCTYPE html>
<html>
<head>
<title>Saturation Example</title>
<link rel="stylesheet" type="text/css" href="simple.css"/>
</head>
<body>
<h2>Example of saturation color channel</h2>
<div class="myclass">
<p>background:90%;</p>
</div>
</body>
</html>
現在創建一個名為 "simple.less" 的文件。它類似於 CSS 文件。唯一的區別是它以 ".less" 擴展名保存。
LESS 文件:simple.less
div類="codeblock">相關用法
- Less shade()用法及代碼示例
- Less sin()用法及代碼示例
- Less sqrt()用法及代碼示例
- Less spin()用法及代碼示例
- Less isstring()用法及代碼示例
- Less image-width()用法及代碼示例
- Less alpha()用法及代碼示例
- Less max()用法及代碼示例
- Less ispixel()用法及代碼示例
- Less acos()用法及代碼示例
- Less contrast()用法及代碼示例
- Less isem()用法及代碼示例
- Less hsvhue()用法及代碼示例
- Less color()用法及代碼示例
- Less isnumber()用法及代碼示例
- Less percentage()用法及代碼示例
- Less pi()用法及代碼示例
- Less red()用法及代碼示例
- Less image-height()用法及代碼示例
- Less iscolor()用法及代碼示例
注:本文由純淨天空篩選整理自 Less saturation()。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。