您现在的位置: 万盛学电脑网 >> 程序编程 >> 网页制作 >> DivCSS教程 >> 正文

如何让div旋转一定的角度呢

作者:佚名    责任编辑:admin    更新时间:2022-06-22

我们为大家收集整理了关于如何让div旋转一定的角度,以方便大家参考。

<html lang="en"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
<title>DIV旋转属性的演示</title> 
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" /> 
<style type="text/css"> 
body { 
font-family: "Arial", sans-serif; 

#example { 
position: absolute; 
border: #09F solid 1px; 
font-weight: 900; 
padding: 10px; 
display: block; 
width: 500px; 
height: 400px; 
margin-top: -1px; 
margin-left: -1px; 
transform: rotate(40deg); 
-o-transform: rotate(40deg); 
-webkit-transform: rotate(40deg); 
-moz-transform: rotate(40deg); 
filter: progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=1.2660444431189777, M12=-0.3327876096865394, M21=0.1127876096865398, M22=0.9660444431189779); 

</style> 
<!--[if IE]> 
<style type="text/css"> 
#example { 
top: 50px; 
left: 50px; 

</style> 
<![endif]--> 
</head> 
<body> 
<div id="example"> 旋转成功</div> 
</body> 
</html> 

希望大家可以学会如何让div旋转一定的角度.想了解更多精彩内容,请关注我们的网站!

相关推荐:

div+css是网页排版技巧介绍