如何让超链接缩进? 我试过这个代码但没有成功。
a {
text-decoration: none;
text-indent: 20px;
}
<a href="#h"> html </a>
最佳答案
如果您不希望所有超链接都缩进,您可以将其包裹在<div>
周围。具有唯一标识;这是另一种解决方案。
HTML:
<div id="indented">
<a href="#h"> html </a>
</div>
CSS:
a{
text-decoration:none;
}
#indented {
text-indent:20px;
}
关于html - 在 CSS 中为超链接缩进,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41515092/