gpt4 book ai didi

html - 减少链接的边框

转载 作者:行者123 更新时间:2023-11-28 13:22:38 25 4
gpt4 key购买 nike

简要 - 我需要缩小文本和边框之间的间距。

它的样子:

what it looks like

它需要看起来像什么:

what it needs to look like

HTML -

<div class="navigation">
<ul>
<li><a href="#" class="active">Home</a></li>
<li><a href="#">Work</a></li>
<li><a href="#">About</a></li>
</ul>
</div>

CSS -

a { font: 36px 'Bebas Neue', Arial, Sans-Serif; color: #fff; text-decoration: none; }
a:hover { color: #d5a72b; border-top: 3px solid #d5a72b; border-bottom: 3px solid #d5a72b; border-spacing: 0; }
a.active { color: #d5a72b; border-top: 3px solid #d5a72b; border-bottom: 3px solid #d5a72b; }

最佳答案

您可以使用 line-height 属性和 padding 来做到这一点。在这种情况下,您需要调整 line-height:

line-height: 10px;

演示:http://jsfiddle.net/Y6Dj3/1/

关于html - 减少链接的边框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15170729/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com