【发布时间】:2013-02-08 21:50:26
【问题描述】:
这是一个非常有趣的案例。
当 overflow:hidden 与 position:relative 一起使用时,奇怪的事情开始发生。自己看吧!
http://cssdeck.com/labs/u1om11qq
HTML
<div class="carrier">
<div class="button"></div>
<div class="button"></div>
</div>
CSS
.carrier{
overflow:hidden;
width:200px;
height: 400px;
border-radius: 50px;
background:blue;
}
.button {
position:relative;
width: 200px;
height: 200px;
background-color:rgba(255,0,0,0.2);
-webkit-transition:all 0.2s ease;
-moz-transition:all 0.2s ease;
-ms-transition:all 0.2s ease;
-o-transition:all 0.2s ease;
transition:all 0.2s ease;
}
.button:hover{
background-color:rgba(255,0,0,1);
}
这种情况(闪烁的边缘)是一个错误,还是我错过了一点?
(溢出:隐藏需要覆盖边缘 - 它会在 chrome 24.0.1312.57.m 上产生奇怪的闪烁)
【问题讨论】:
-
怎么了?我们会看到什么?什么“奇怪”的东西??
-
刚刚编辑了问题-
-
搜索border-radius bug chrome
-
我使用的是同一版本的 chrome,但我没有看到任何闪烁。当鼠标离开时,角落似乎确实在淡出的中途“卡住”了。很奇怪……
标签: html google-chrome css