首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

初始字母对齐 | initial-letter-align

这是一种实验技术

由于该技术的规格不稳定,请查看各种浏览器的兼容性表格以供使用。另外请注意,随着规范的变化,实验技术的语法和行为在未来版本的浏览器中可能会发生变化。

initial-letter-align属性指定段落中的首字母的排列。

代码语言:javascript
复制
/* Keyword values */
initial-letter-align: auto;
initial-letter-align: alphabetic;
initial-letter-align: hanging;
initial-letter-align: ideographic;

/* Global values */
initial-letter-align: inherit;
initial-letter-align: initial;
initial-letter-align: unset;

初始值

auto

应用于

::first-letter pseudo-elements and inline-level first child of a block container

是否继承

no

适用媒体

visual

计算值

as specified

Animation type

discrete

规范顺序

the unique non-ambiguous order defined by the formal grammar

句法

下面列出的关键字值之一。

取值

auto用户代理选择对应于文本语言的值。西方语言会默认使用字母,CJK语言来表意文字,还有一些印度语言可以悬挂。

alphabetic如上所述,首字母的字母高度与第一行文字的字母高度对齐。首字母的基线与第N个文本基线的基线对齐。

hanging首字母的悬挂基线与第一行文字的悬挂基线对齐。

ideographic首字母在N线区域居中。

形式语法

代码语言:javascript
复制
[ auto | alphabetic | hanging | ideographic ]

规格

Specification

Status

Comment

CSS Inline LayoutThe definition of 'initial-letter-align' in that specification.

Working Draft

Initial definition

浏览器兼容性

Feature

Chrome

Firefox (Gecko)

Internet Explorer

Opera

Safari

Basic support

No support

No support

No support

No support

No support

Feature

Android

Firefox Mobile (Gecko)

IE Mobile

Opera Mobile

Safari Mobile

Basic support

No support

No support

No support

No support

No support

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com