CSS hyphenate-character 屬性
- 上一頁 hyphens
- 下一頁 image-rendering
定義和用法
hyphenate-character
屬性用于定義在換行符之前的連字符斷字處使用的字符。
實例
設置 hyphenate-character
:
<style> div.a { hyphenate-character: auto; } div.b { hyphenate-character: "="; } </style> <body> <div class="a">A veryveryvery long word.</div> <div class="b">A veryveryvery long word.</div> </body>
CSS 語法
hyphenate-character: auto|string|initial|inherit;
屬性值
值 | 描述 |
---|---|
auto | 默認值。瀏覽器根據當前的排版慣例選擇合適的字符。 |
string | 指定在換行符之前的連字符斷字處使用的字符。 |
initial | 將此屬性設置為其默認值。參閱 initial。 |
inherit | 從其父元素繼承此屬性。參閱 inherit。 |
技術細節
默認值: | auto |
---|---|
繼承性: | yes |
動畫制作: | 不支持。請參閱:動畫相關屬性。 |
版本: | CSS4 |
JavaScript 語法: | object.style.hyphenateCharacter="/" |
瀏覽器支持
表格中的數字表示首個完全支持該屬性的瀏覽器版本。
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
106.0 | 106.0 | 98.0 | 17.0 | 92.0 |
- 上一頁 hyphens
- 下一頁 image-rendering