我有嵌套元素,其中 parent 的背景在 iDevices 上可见。无论浏览器(尝试过 Chrome 和 Safari)如何,它都会创建类似于 bleed 的边框/轮廓。在打印中。
谁能帮帮我?
这是一个简化的代码和 JSFiddle:http://jsfiddle.net/5eTDD/6/
<div class="a">
<div class="b"></div>
</div>
.a {background:#000; margin:10px; display:inline-block}
.b {width:100px; height:100px; background:#fff;}
屏幕截图:
最佳答案
看起来边框出现在 anchor 上,而不是列表元素上。尝试添加:
a {border:0 !important}
iDevices 有一个内置的样式表,有时会导致这种情况,这就是 !important 在那里的原因 - 覆盖它。它甚至可能与您的“事件”类相关联 - 您也可以尝试将类更改为其他内容,只需尝试 active1,看看是否也能解决问题。
关于iphone - iOS : parent's background visible around the edges 中的嵌套元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12149581/