CSS hanging-punctuation 属性值说明
| 值 | 描述 |
|---|---|
| none | 没有标点符号将被放置。这是此属性的默认值。 |
| first | 标点符号将悬挂在第一行的起始边缘外部。 |
| last | 标点符号将悬挂在第一行的终端边缘外部。 |
| allow-end | 如果在理由之前,标点符号将悬挂在一条线的端部边缘外部。 |
| force-end | 标点符号将悬挂在所有线路的端部外部。如果在此行上启用了理由,那么它将强制标点符号挂起。 |
| initial | 使属性使用其默认值。 |
| inherit | 从父母元素继承属性。 |
hang-punctuation 属性指定标点符号应挂在文本行的开头还是结尾。
悬挂标点符号与完全对齐的文本一起使用,并在行 tail使用时控制文本段落中所有行的对齐方式。
只有 Safari 支持此属性。
| 初始值 | none |
|---|---|
| 应用于 | 所有元素。 |
| 继承 | 可继承 |
| 可动画的 | 无效 |
| 版本 | CSS3. |
| DOM 语法 | object.Style.HangingPunctuy =“Last”; |
语法
hanging-punctuation: none | first | last | allow-end | force-end | initial | inherit;
悬挂标点属性的示例:
<!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
<style>
blockquote {
font-style: normal;
font-size: 25px;
width: 20em;
border-left: 1px solid #000;
padding: 3rem 0;
hanging-punctuation: first;
}
</style>
</head>
<body>
<h2>Hanging-punctuation 属性示例</h2>
<blockquote>生活本就是矛盾的,白天与黑夜间的距离,春夏秋冬之间的轮回,于是有了挑剔的喜爱,让无奈加上了喜悦的等待。</blockquote>
</body>
</html>
日期:2020-06-02 22:14:35 来源:oir作者:oir
