Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/446.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/81.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript jQuery don';我不能很好地使用Internet Explorer 8_Javascript_Jquery_Internet Explorer 8 - Fatal编程技术网

Javascript jQuery don';我不能很好地使用Internet Explorer 8

Javascript jQuery don';我不能很好地使用Internet Explorer 8,javascript,jquery,internet-explorer-8,Javascript,Jquery,Internet Explorer 8,我在互联网上找到了一个时钟插件,但它不适用于IE8。为什么? 代码: JavaScript代码 解决方案 使用另一个WebBrowser,IE8的rotate属性会很差。如果有人需要更多关于这方面的信息,请看这里。它似乎对transform css属性使用了rotate值,这在9下的IE版本中是不受支持的,因为IE8很糟糕,应该禁止朝鲜以外的任何人使用。因为您使用的是webkit样式,IE不是webkit-webkit transform:rotate(436.5度)@Bondye脚本使用适合浏

我在互联网上找到了一个时钟插件,但它不适用于IE8。为什么?

代码:

JavaScript代码

解决方案


使用另一个WebBrowser,IE8的rotate属性会很差。如果有人需要更多关于这方面的信息,请看这里。

它似乎对transform css属性使用了rotate值,这在9下的IE版本中是不受支持的,因为IE8很糟糕,应该禁止朝鲜以外的任何人使用。因为您使用的是webkit样式,IE不是webkit
-webkit transform:rotate(436.5度)@Bondye脚本使用适合浏览器的转换。对于IE,它使用相应的IE转换。请阅读
       $(function() {                                         

            if ($("#sec").length > 0) {
                setInterval(function() {
                    var seconds = new Date().getSeconds();
                    var sdegree = seconds * 6;
                    var srotate = "rotate(" + sdegree + "deg)";
                    $("#sec").css("transform", srotate);

                }, 1000);
            }

            if ($("#hour").length > 0) {
                setInterval(function() {
                    var hours = new Date().getHours();
                    var mins = new Date().getMinutes();
                    var hdegree = hours * 30 + (mins / 2);
                    var hrotate = "rotate(" + hdegree + "deg)";
                    $("#hour").css("transform", hrotate);

                }, 1000);
            }

            if ($("#min").length > 0) {
                setInterval(function() {
                    var mins = new Date().getMinutes();
                    var mdegree = mins * 6;
                    var mrotate = "rotate(" + mdegree + "deg)";
                    $("#min").css("transform", mrotate);
                }, 1000);
            }
        });