css实现文字竖向排版

时间:2024-10-02 07:27:23
<!DOCTYPE html> <html> <head> <title>test</title> <meta charset="UTF-8"> </head> <style> .one { margin: 150px auto; width: 200px; font-size: 20px; line-height: 24px; transform:rotate(90deg); -ms-transform:rotate(90deg); /* IE 9 */ -moz-transform:rotate(90deg); /* Firefox */ -webkit-transform:rotate(90deg); /* Safari 和 Chrome */ -o-transform:rotate(90deg); /* Opera */ } </style> <body> <div class="one">欲话毗陵君反袂</div> <div class="one">ENGLISH</div> </body> </html>