js html转图片 ie8,用js滤镜实现在IE8-的图片旋转效果实现不了
.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;
}
?? ??? ??? ?
向左旋轉(zhuǎn)
向右旋轉(zhuǎn)
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);
}
總結(jié)
以上是生活随笔為你收集整理的js html转图片 ie8,用js滤镜实现在IE8-的图片旋转效果实现不了的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: html表格选择一行,vue + ele
- 下一篇: 印象笔记html预览,7 个方法,把印象