<style>????????????.img_box{?? ??? ??? ??? ?width:500px;?? ??? ??? ??? ?height:500px;?? ??? ??? ??? ?border:1px solid #ccc;?? ??? ??? ??? ?text-align: center;?? ??? ??? ??? ?margin:0px auto;?? ??? ??? ?}?? ??? ??? ?.btns{?? ??? ??? ??? ?width:500px;?? ??? ??? ??? ?margin:10px auto;?? ??? ??? ??? ?text-align: center;?? ??? ??? ?}</style><body><div class="img_box" id="boxid">?? ??? ??? ?<img id="img_id" src="img/73e5.jpg"/>?? ??? ?</div>?? ??? ?<div class="btns">?? ??? ??? ?<button class="btn_prev" onclick="rotateLeft(90)">向左旋轉</button>?? ??? ??? ?<a class="btn_next" href="javascript:;">向右旋轉</a>?? ??? ?</div>?? ??? ?<script src="js/jquery-1.8.0.min.js" type="text/javascript" charset="utf-8"></script>?? ??? ?<script type="text/javascript">?? ??? ??? ?function rotateLeft(rotation){????????????????//第一種方法:?? ??? ??? ???? var sin = Math.sin(rotation);?? ??? ??? ??? ?var cos = Math.cos(rotation);?? ??? ??? ??? ?alert(sin);?? ??? ??? ??? ?var M11= cos,M12=-sin,M21=sin,M22=cos;?? ??? ??? ??? ?var img_id = document.getElementById('img_id');?? ??? ??? ???? img_id.style.filter = "progid:DXImageTransform.Microsoft.Matrix(M11="+M11+",M12="+M12+",M21="+M21+",M22="+M22+",SizingMethod='auto expand')";????????????????//第二種方法:????????????????img_id.style.filter =
progid:DXImageTransform.Microsoft.BasicImage(rotation=1);?? ??? ???? }?? ??? ?</script></body>
用js濾鏡實現(xiàn)在IE8-的圖片旋轉效果實現(xiàn)不了
慕桂英2234914
2017-09-19 16:04:03