Asen123 Asked:2020-02-26 03:18:54 +0000 UTC2020-02-26 03:18:54 +0000 UTC 2020-02-26 03:18:54 +0000 UTC 内容后显示不正确 772 问题是,我想在文本下方画线。我将内容保留为“”,但由于某种原因它不能很好地显示(不响应缩进),但只要我向内容添加一个字符,它就会立即正常工作。这怎么可能相关?是否有某种“空字符”? html 1 个回答 Voted Best Answer Air 2020-02-26T03:46:49Z2020-02-26T03:46:49Z * { margin: 0; padding: 0; } html, body { width: 100%; height: 100%; background: #272727; color: #fff; } div { position: relative; width: 100px; height: 100px; background: orange; text-align: center; } div.p:after { position: absolute; content: ""; width: 100px; height: 2px; background: red; bottom: 5px; left: 0; } <div class="p"> Это div </div>
1 个回答