在 HTML 中设置内部表格边框
如何设置“内边框”——不同单元格之间的边框。
通过设置样式属性,我设法控制外边框,但内边框仅保持相同的灰色和相同的宽度。我应该调整哪些属性来控制内边框?
How do I set the "inner border" - the border between different cells.
By setting style attributes I manage to control the outer border, but the inner border just stays the same gray color and the same width. What attributes should I tweak to control the inner border?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
对于普通的表格标记,这里有一个简短的解决方案,适用于 BrowserStack 上的所有设备/浏览器(IE 7 及以下版本除外):
对于 IE 7 支持,请添加以下内容:
可以在此处查看测试用例: http://codepen.io/dalgard/pen/wmcdE
For ordinary table markup, here's a short solution that works on all devices/browsers on BrowserStack, except IE 7 and below:
For IE 7 support, add this:
A test case can be seen here: http://codepen.io/dalgard/pen/wmcdE
您需要设置
元素的样式。
查看 W3C 网站
You need to style the
<td>
element.Take a look at the W3C website