<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> <style> .box { width: 20px; height: 30px; transform: rotate(90deg); -ms-transform: rotate(90deg); /* Internet Explorer 9*/ -moz-transform: rotate(90deg); /* Firefox */ -webkit-transform: rotate(90deg); /* Safari 和 Chrome */ -o-transform: rotate(90deg); /* Opera */ } </style> </head> <body> <p class="box">123</p> </body> </html>
效果:
原效果: