表边框不直(Table borders not straight)

编程入门 行业动态 更新时间:2024-10-26 04:20:12
边框不直(Table borders not straight)

我正在使用表创建一个html迷宫,由于某种原因,边框没有正确显示。 而不是漂亮的直线,边框显示为对角线blob而不是。 有没有办法来解决这个问题? 这是我的例子: http : //thomaswd.com/maze 。

输出:

我的CSS:

section .l { border-left:20px solid #ff9c00; } section .r { border-right:20px solid #ff9c00; } section .t { border-top:20px solid #ff9c00; } section .b { border-bottom:20px solid #ff9c00; } section table { margin-right:auto; margin-left:auto; border:20px solid #FF9C00; }

I am creating a html maze using tables and for some reason, the borders dont show up correctly. Instead of nice straight lines, the borders show up as diagonal blobs instead. Is there a way to fix this? Here is my example : http://thomaswd.com/maze.

Output:

My CSS:

section .l { border-left:20px solid #ff9c00; } section .r { border-right:20px solid #ff9c00; } section .t { border-top:20px solid #ff9c00; } section .b { border-bottom:20px solid #ff9c00; } section table { margin-right:auto; margin-left:auto; border:20px solid #FF9C00; }

最满意答案

去除border: 20px solid transparent; 从您的section table tr td选择器(未在您的代码示例中显示),它看起来很好。

在此处输入图像描述

Remove border: 20px solid transparent; from your section table tr td selector (not shown in your code sample) and it looks fine.

enter image description here

更多推荐

本文发布于:2023-08-07 11:25:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1464285.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:边框   Table   straight   borders

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!