简体   繁体   English

div中重叠圆角的内容。

[英]Content in div overlapping rounded corners.

I am trying to get rounded corners on a table element. 我试图在表格元素上弄圆角。 Ideally, I would like the rounded corners to show on IE 7-10, Chrome, and Firefox. 理想情况下,我希望在IE 7-10,Chrome和Firefox上显示圆角。 To do that, I am using JQuery Corner . 为此,我正在使用JQuery Corner The problem I am facing is that when I apply the default rounded corner effect to the div that surrounds my table, the table overlaps the borders/corners. 我面临的问题是,当我将默认的圆角效果应用于表周围的div时,表会与边框/角重叠。

Here a screenshot: 这里的截图: 边界

Why is table going outside of my div? 为什么桌子在我的div外面?

Tables don't accept border-radius as a property. 

http://jsfiddle.net/Kyle_/zBE6H/ http://jsfiddle.net/Kyle_/zBE6H/

What you can do is wrap it in a div and give that border radius, while removing the border of the table (or giving the border the same color as the div's background.) 您可以做的是将其包裹在div中并赋予该边框半径,同时删除表格的边框(或为边框提供与div背景相同的颜色)。

http://jsfiddle.net/Kyle_/zBE6H/1/ http://jsfiddle.net/Kyle_/zBE6H/1/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM