label通过CSS竖直显示文字

Figure

在这里插入图片描述

Code

css

        .vertical {
            writing-mode: vertical-lr;
            text-decoration: underline;
            transform: rotate(180deg);
        }

html

<!DOCTYPE html>
<html>
<head>
    <title>Page Title</title>
    <style>
        .vertical {
            writing-mode: vertical-lr;
            text-decoration: underline;
            transform: rotate(180deg);
        }
    </style>
</head>

<body>
    <label id='test'>this is word to show.</label>
    <label id='test2' class="vertical">this is word to show.</label>
</body>

</html>

猜你喜欢

转载自blog.csdn.net/sgs595595/article/details/83828777
今日推荐