在垂直布局html中使用字母间距有什么用

时间:2017-12-19 13:12:26

标签: html css css3 letter-spacing vertical-text

我想了解日本的垂直htmls。 在我的分析过程中,我发现很多地方的内容都有letter-spacing : <Negative value>。 我很少在水平内容中使用这种css样式,但在JP中它主要用于数字。

span.tcy {
    -webkit-text-combine: horizontal;
    -epub-text-combine: horizontal;
    text-combine: horizontal;
    font-size: 0.9em;
    line-height: 0.9em;
    text-indent: 0;
    letter-spacing: -1px;
}

.tcy {
    -webkit-text-combine: horizontal;
    -epub-text-combine: horizontal;
    text-combine: horizontal;
    font-size: 0.9em;
    line-height: 0.9em;
    text-indent: 0em;
    letter-spacing: -1px;
}

任何人都可以解释一下字母间距css风格的实际用例以及为什么它主要用于日文垂直内容来格式化数字。 感谢。

1 个答案:

答案 0 :(得分:1)

当你在字母间距属性上使用负值时,它只会收紧字母。

所有字体在字母之间没有相同的空格,这就是为什么你可能需要这个技巧来完成这项工作,主要是出于设计目的。

对于日文垂直内容,我认为您必须使用字母间距属性AND line-height来获得“完美”内容。

我正在给你这个链接,这可能对你有帮助。不要犹豫,用一个片段编辑你的帖子,然后我可以更准确地回答你。

https://code.tutsplus.com/tutorials/the-easiest-way-to-create-vertical-text-with-css--net-15284