Chrome和溢出:隐藏的问题 [英] Chrome and overflow:hidden issue

查看:150
本文介绍了Chrome和溢出:隐藏的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的JavaScript中,我使用jquery animate()函数自动滑动推文。



代码:

 函数movefeeds(){
var element = jQuery(#Feeds);
var position = element.position();

if(position.left == 2000){
element.css(left,500px);
}

element.animate({left: - = 500px},slow);
}

在每个浏览器中,代码都完全是它必须做的:滑动。但是在Chrome中它并不总是滑动,它滑动一半的时间。即使它滑动, left 也会得到非常糟糕的值(即584.2132312而不是500,1000等)。

任何建议,将不胜感激:-)

编辑:看起来像一个CSS问题: chrome (从版本11 )似乎在 overflow:hidden



中存在一些问题编辑2:请参阅此问题

解决方案

在chrome中找不到使用 overflow:hidden 的解决方案。
因此,我从css中删除了 overflow ,并将一些包含z-index的div放在推文上隐藏它们。



在此找到我的解决方案:问题 p>

In my javascript I use the jquery animate() function to slide tweets automatically.

Code:

function movefeeds() {
   var element = jQuery("#Feeds");
   var position = element.position();

   if(position.left == 2000){
      element.css("left", "500px");
   } 

   element.animate({ "left": "-=500px" }, "slow");   
}

In every browser to code does exactly what it must do: sliding. But in Chrome it is not sliding always, it is sliding half the time. And even if it slides, left gets really bad values (ie. 584.2132312 instead of 500, 1000 etc.)

Any suggestion would be appreciated :-)

EDIT: Looks like a css issue: chrome (from version 11) seems to have some trouble with overflow:hidden

EDIT 2: See this question

解决方案

Could not find any solution for using overflow:hidden in chrome. So I removed the overflow from my css and put some div's with z-index over the tweets to hide them.

Found my solution in this: Question

这篇关于Chrome和溢出:隐藏的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆