边界半径出血
我想给
I want to give border-radius to a <nav>
in which all the <a>
have an image has background, but the image keeps going outside the border-radius. Why is that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
要在所有浏览器中解决此问题,您应该使用:
我在此处找到了答案
To fix this in all browsers you should use:
I found the answer here
添加:
在 Webkit 中修复此问题。
Add:
To fix this in Webkit.
我遇到了
bootstrap panel
边框或背景渗入HTML
header的问题。
。引导面板
上方的元素
元素具有class="page-header"
并包含在div
元素中,其class="col -lg-12”
。这里和其他地方的答案对我不起作用。有效的方法是将其添加到
panel
s CSS 类中:我从 获得了指示这里来自卡罗尔的回答。
编辑:
这给我带来了另一个问题。我在面板中有下拉控件,并且
overflow:hidden;
导致下拉菜单被切断并且未完全显示。下拉菜单包含在具有 Bootstrap
col-lg
类的div
元素中。我将style="position:inherit"
添加到包含下拉列表的那些div
元素中,这解决了问题。我找到了该问题的解决方案 这里。
其他选项:
我在正在出血的
div
标签之前添加了 3 或 4 个
元素,并且解决了出血问题,而无需任何不良副作用。I had a problem with a
bootstrap panel
border or background bleeding to aHTML
header<h> element
above thebootstrap panel
. The<h>
element hasclass="page-header"
and is contained in adiv
element withclass="col-lg-12"
. The answers here and in other places didn't work for me.What worked was adding this to the
panel
s CSS class:I got the direction from here from Carol's answer.
Edit:
This caused another problem for me. I had Dropdown controls in the panel and the
overflow:hidden;
caused the dropdowns to be cut off and not displayed fully.The dropdowns are contained in
div
elements with Bootstrapcol-lg
classes. I addedstyle="position: inherit"
to thosediv
elements containing the dropdowns and that solved the problem.The solution to that problem I found here.
Additional Option:
I added 3 or 4
<br/>
elements before thediv
tag that was bleeding and that solved the bleeding problem without any bad side effects.