text-combine-upright与垂直排版实例页面

回到相关文章 »

效果:

我叫张鑫旭,2021218日我36

对比text-orientation

我叫张鑫旭,2021218日我36

默认

我叫张鑫旭,2021218日我36

代码:

CSS代码:
.upright {
    writing-mode: tb-lr;
    writing-mode: vertical-lr;
}
.upright span {
    -ms-text-combine-horizontal: all;
    text-combine-upright: all;
    -webkit-text-combine: horizontal;
    text-combine-upright: digits 4;
}
.orientation {
    text-orientation: upright;
    writing-mode: tb-lr;
    writing-mode: vertical-lr;
}
.default {
    writing-mode: tb-lr;
    writing-mode: vertical-lr;
}
HTML代码:
<p class="upright">我叫张鑫旭,<span>2021</span>年<span>2</span>月<span>18</span>日我<span>36</span>岁</p>

<h4>对比text-orientation</h4>
<p class="orientation">我叫张鑫旭,<span>2021</span>年<span>2</span>月<span>18</span>日我<span>36</span>岁</p>

<h4>默认</h4>
<p class="default">我叫张鑫旭,<span>2021</span>年<span>2</span>月<span>18</span>日我<span>36</span>岁</p>