iphone - iOS : parent's background visible around the edges 中的嵌套元素

标签 iphone css ipad

我有嵌套元素,其中 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;}​

屏幕截图:

screenshot

最佳答案

看起来边框出现在 anchor 上,而不是列表元素上。尝试添加:

a {border:0 !important}

iDevices 有一个内置的样式表,有时会导致这种情况,这就是 !important 在那里的原因 - 覆盖它。它甚至可能与您的“事件”类相关联 - 您也可以尝试将类更改为其他内容,只需尝试 active1,看看是否也能解决问题。

关于iphone - iOS : parent's background visible around the edges 中的嵌套元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12149581/

相关文章:

iphone - iOS 7 中的 UIView 显示问题

iphone - 使用 fatsecret food api 时出现无效的 oauth 签名错误

iphone - 适用于 iOS 的可视化分析工具?

css - Bootstrap 模板在 MVC 应用程序中不起作用

iphone - 通过 Iphone SDK 发布 Facebook 状态更新和 url

css - 我应该使用媒体查询进行响应式设计吗?

css - 使用 Bootstrap 类垂直对齐文本框

php - 从 is_mobile 中排除 iPad 和平板电脑

iphone - iOS 开发 : How can I cause a UITableViewCell to change into an editable UITextField when it's tapped?

ios - 我可以在 drawRect 方法之外绘制圆形、矩形、直线等形状吗