jQuery获取css z-index在各种浏览器中的返回值 |
本文标签:css,z-index 测试代码: 复制代码 代码如下: <!DOCTYPE html> <html lang="en"> <head> <meta charset="GBK" /> <meta http-equiv="Content-Type" content="text/html; charset=gbk" /> <title>jQuery Css Test</title> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> jQuery(document).ready(function(){ alert(typeof jQuery(#csszindex).css(z-index)); }); </script> </head> <body> <span id="csszindex" style="z-index:100px;">test</span> </body> </html> 弹出框显示信息: IE8:
IE7:
IE6:
Firefox:
Chrome:
Opera:
后面的几个都一样,都返回的是String类型的 。 |