Chrome CSS宽度问题

时间:2014-11-18 01:00:58

标签: css google-chrome width render

之前有人见过吗?

由于某种原因,Chrome会出现轻微的宽度渲染问题,而这些问题并未在Firefox或Safari中显示。如果您看到该图片,则会看到Chrome有轻微的垂直缩进。 top和current元素都处于相同的HTML DOM级别。两者都有相同的&关系和CSS。

我使用bootstrap和LESSHat。不要认为它是CSS,因为Firefox或Safari没有问题。

我尝试了抗锯齿,灰度,但没有一个有所作为。 enter image description here

& div.toolbar-group {
position:                               absolute;
z-index:                                200;
width:                                  96%;
padding:                                0;
margin:                                 0 auto;
margin:                                 20% 0 0 2%; 
white-space:                            nowrap;
-webkit-font-smoothing:                 antialiased;
-moz-osx-font-smoothing:                grayscale;      
background:                             #3c4145;
.box-shadow(    2px 0 0px 0 rgba(0,0,0,0.6), 
                -2px 0 0px 0 rgba(0,0,0,0.6));          
& ul.toolbar-frame {
    position:                           relative;
    list-style:                         none;
    height:                             38px;
    width:                              98%;
    border:                             1px solid #000; 
    .background-image(linear-gradient(to bottom, #525252 0%,#2b2b2b 100%)); 
}

}

1 个答案:

答案 0 :(得分:0)

Chrome宽度不是您使用javascript或CSS获得的。

在Dev Tools打开时尝试使用此代码调整大小。 需要jquery轻松

$(window).resize(function () {
        console.log(" -jqwidth:", $(window).width(), " -inner:", window.innerWidth, " -outer:", window.outerHeight );
 });

输出如下:

-jqwidth: 973  -inner: 992  -outer: 1100

Chrome显示 892

Chrome现在比资源管理器差。它只是s.ucks。