问题描述
我想实现一个带有一行的文本:------------ TEXT ------------
如此处所述: CSS technique for a horizontal line with words in the middle
但是我需要将其设置为垂直方向
writing-mode: vertical-rl;
text-orientation: mixed;
我将如何实现?
解决方法
试试看,
span:after,span:before{
content:"\00a0\00a0\00a0\00a0\00a0";
text-decoration:line-through;
}
h2{
writing-mode: vertical-rl;
text-orientation: mixed;
margin:0;
}
<h2><span>vertically</span></h2>