每一种美,都会有一双眼睛能看到;每一份爱,总会有一颗心会感受到。

谷歌hack

body:nth-of-type(1) .subbox{position:fixed; left:50%; top:100px; width:630px; height:593px; margin-left:-315px;z-index:9;}
谷歌需采用采用谷歌hack解决,在样式名前加body:nth-of-type(1);采用fixed定位

js:/*设置top值*/
 t = document.body.scrollTop;
$(".subbox").css("top",(t+50)+"px");

 

 @media screen and (-webkit-min-device-pixel-ratio:0){ .subbox{position:fixed; left:50%; top:100px; width:630px; height:593px; margin-left:-315px;z-index:9;}
 }/*google webkit 内核*/

posted @ 2012-07-04 13:48  温暖向阳Love  阅读(427)  评论(0编辑  收藏  举报