text-decoration-skip-ink屬性用於指定下劃線和上劃線穿過字符或字形時的呈現方式。
用法:
text-decoration-skip-ink:auto | none
屬性值:
- auto:此值用於指定跳過通過字符的下劃線和上劃線。它是默認值。
- none:此值用於指定不跳過通過字符的下劃線和上劃線。它將切入‘g’和‘t’之類的字符。
以下示例說明了CSS text-decoration-skip-ink屬性:
範例1:在此示例中,我們將使用text-decoration-skip-ink:auto;適當的價值。
<!DOCTYPE html>
<html>
<head>
<title>
CSS | text-decoration-skip-ink
</title>
<style>
.skip-ink-auto {
font-size:2em;
text-decoration:underline green;
/* text decoration-skip-ink effect */
text-decoration-skip-ink:auto;
}
</style>
</head>
<body>
<center>
<h1 style="color:green">
GeeksforGeeks
</h1>
<b>
CSS | text-decoration-skip-ink:auto;
</b>
<div class="skip-ink-auto">
A Computer Science portal for geeks
</div>
</center>
</body>
</html>
輸出:
範例2:在此示例中,我們將使用text-decoration-skip-ink:none;適當的價值。
<!DOCTYPE html>
<html>
<head>
<title>
CSS | text-decoration-skip-ink
</title>
<style>
.skip-ink-none {
font-size:2em;
text-decoration:underline green;
/* text decoration-skip-ink effect */
text-decoration-skip-ink:none;
}
</style>
</head>
<body>
<center>
<h1 style="color:green">
GeeksforGeeks
</h1>
<b>
CSS | text-decoration-skip-ink:none;
</b>
<div class="skip-ink-none">
A Computer Science portal for geeks
</div>
</center>
</body>
</html>
輸出:
支持的瀏覽器:下麵列出了text-decoration-skip-ink屬性支持的瀏覽器:
- 穀歌瀏覽器64
- Firefox 70
- Opera 50
相關用法
- CSS transition-property用法及代碼示例
- CSS table-layout用法及代碼示例
- CSS text-align用法及代碼示例
- CSS border-top-width用法及代碼示例
- CSS isolation屬性用法及代碼示例
- CSS border-inline-start-style屬性用法及代碼示例
- CSS column-rule-width用法及代碼示例
- CSS word-spacing用法及代碼示例
- CSS animation-delay用法及代碼示例
- CSS margin-top用法及代碼示例
- CSS grid屬性用法及代碼示例
- CSS font-size-adjust用法及代碼示例
- CSS visibility屬性用法及代碼示例
- CSS Display屬性用法及代碼示例
- CSS grid-template-columns用法及代碼示例
- CSS height屬性用法及代碼示例
- CSS transform-origin用法及代碼示例
注:本文由純淨天空篩選整理自sayantanm19大神的英文原創作品 CSS | text-decoration-skip-ink Property。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。