JS能不能做出原地旋转的效果????? 沙发吗 ? 好久没有沙发了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 完全可以IE 用距阵滤镜FF用canvas关于canvas没有研究过。。距阵滤镜,可参考如下代码<div style="position:relative; width:438px; height:438px; background-color:#F4F4F4;"> <div id="wc" style="position:absolute; left:119px; top:73px; width:200px; height:292px;"> <img src="http://www.cnblogs.com/images/cnblogs_com/wentomi/Untitled-2.jpg"> </div></div><script type="text/javascript">//progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand')var Revolve = { object : null , init : function (o, w) { this.object = o; this.width = w; o.style.filter = "progid:DXImageTransform.Microsoft.Matrix()"; //设置滤镜的属性值 o.filters.item("DXImageTransform.Microsoft.Matrix").SizingMethod = "auto expand"; o.filters.item("DXImageTransform.Microsoft.Matrix").FilterType = "bilinear"; } , revolve : function (n, f) { var o = this.object, r, sin, cos; n = (n + f) % 360; r = n / (360 / (Math.PI * 2)); sin = Math.sin(r), cos = Math.cos(r); with (o.filters.item("DXImageTransform.Microsoft.Matrix")) { M11 = cos, M12 = -sin, M21 = sin, M22 = cos; } with (o.style) { left = this.width / 2 - o.offsetWidth / 2; top = this.width / 2 - o.offsetHeight / 2; } return n; } };window.onload = function () { if (!/MSIE/.test(window.navigator.userAgent)) return; var o = document.getElementById("wc"), n = 0; Revolve.init(o, 438); o.timer = window.setInterval(function () { n = Revolve.revolve(n, 20); }, 50);};</script> 这个简单的JS为什么不能在IE中显示啊? 调查:大家一般调试js都用什么工具? 如何防止(遨游Maxthon、世界之窗)之类浏览器问题 关于jsp页面调取java类的问题? 这个星号代表啥 正则表达式的问题 submit为什么提交 如何正确的截取中文字符串的子串 关于帧结构中关闭窗口的问题(马上结) 怎么动态改变某个Frame的背景图像? 类似qq空间和新浪blog的 弹出登录窗口是怎么做的? 请帮我看一下这段代码哪里有问题
关于canvas没有研究过。。
距阵滤镜,可参考如下代码<div style="position:relative; width:438px; height:438px; background-color:#F4F4F4;">
<div id="wc" style="position:absolute; left:119px; top:73px; width:200px; height:292px;">
<img src="http://www.cnblogs.com/images/cnblogs_com/wentomi/Untitled-2.jpg">
</div>
</div>
<script type="text/javascript">
//progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand')var Revolve = {
object : null
, init : function (o, w) {
this.object = o;
this.width = w;
o.style.filter = "progid:DXImageTransform.Microsoft.Matrix()";
//设置滤镜的属性值
o.filters.item("DXImageTransform.Microsoft.Matrix").SizingMethod = "auto expand";
o.filters.item("DXImageTransform.Microsoft.Matrix").FilterType = "bilinear";
}
, revolve : function (n, f) {
var o = this.object, r, sin, cos;
n = (n + f) % 360;
r = n / (360 / (Math.PI * 2));
sin = Math.sin(r), cos = Math.cos(r);
with (o.filters.item("DXImageTransform.Microsoft.Matrix")) {
M11 = cos, M12 = -sin, M21 = sin, M22 = cos;
}
with (o.style) {
left = this.width / 2 - o.offsetWidth / 2;
top = this.width / 2 - o.offsetHeight / 2;
}
return n;
}
};window.onload = function () {
if (!/MSIE/.test(window.navigator.userAgent)) return;
var o = document.getElementById("wc"), n = 0;
Revolve.init(o, 438);
o.timer = window.setInterval(function () {
n = Revolve.revolve(n, 20);
}, 50);
};
</script>