这样就好多了
| 好多了 | 猜猜现在我们用了多少标记?仅仅 2.1k。这里只有 4 行 2 列,还没有用来作间隔的 GIF。 |
| 就这样 | 而且所有这些虚线边框都是由 CSS 完成的,它们完全符合标准。
|
| 只用了 8 个表格单元和 4 条 CSS 规则。 | 我是说真的。就用了 8 个单元 4 条规则。
|
| 你只需要一条规则给 <table>,一条给 <td>,一条给 <ul>,还有一条给 <li>。 | 就这么简单,写好这些就大功告成了。
|
这是用来去掉那些多余的标记的 CSS 代码:
table { border-bottom: 1px dotted fuchsia; border-left: 1px dotted fuchsia }
td { padding: 11px 20px 20px 11px; border-top: 1px dotted fuchsia; border-right: 1px dotted fuchsia }
ul { margin-top: 10px; margin-bottom: 10px; margin-left: 0; padding-left: 1em }
li { margin-bottom: 10px }
