CSS控制字元寬度 屬性 letter-spacing 執行個體教程

來源:互聯網
上載者:User

 letter-spacing 增加或減少白色的空間之間的字元。

繼承:是

註:負值是不允許的。

JavaScript的文法
的CSS屬性也可以動態改變一個JavaScript 。

指令碼文法: object.style.letterSpacing = “ 3px ”

簡單例子.

p

letter-spacing: 12px
}

p

letter-spacing: -0.5px

Value Description
normal
預設。界定空間之間的正常字元
length
確定一個固定的空間之間的字元

<html>

<head>
<style type="text/css">
h1 {letter-spacing: -3px}
h4 {letter-spacing: 0.5cm}
</style>
</head>

<body>
<h1>This is header 1</h1>
<h4>This is header 4</h4>
</body>

</html>

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.