<style type="text/css">#div1{width: 300px;height: 300px;background-color: greenyellow;}</style></head><body><input type="button" name="btn" id="btn" value="点击旋转" /><div id="div1"></div></body><script type="text/javascript" src="js/jquery-1.11.0.js"></script><script type="text/javascript" src="js/jQueryRotate.js"></script><script type="text/javascript">$(function(){var angle = 0;$("#btn").click(function(){var timer = setInterval(function(){angle+=3;$("#div1").rotate(angle);},10);});})
1 回答
慕标5832272
TA贡献1966条经验 获得超4个赞
本质上是IE8不支持transform这个属性,所以实现不了rotate
不过还是有兼容性的写法的:
<div style="position:absolute;filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform: rotate(270deg); -moz-transform: rotate(270deg); -o-transform: rotate(270deg);transform: rotate(270deg);">内容啊</div>
针对IE8:
<div style="position:absolute;filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3)">内容啊</div>
添加回答
举报
0/150
提交
取消