本教程操作环境:windows7系统、css3&&html5版、dell g3电脑。
<!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>
效果:
原效果:
推荐学习:css视频教程
以上就是css如何使文字方向转90度的详细内容。
