Css 锚定标记上的边框底部填充
我在标题中有一个锚定标签,我试图在锚定标签上放置一个边框底部,这是可行的,但是底部的填充太大,负填充不起作用,我如何解决这个问题 生活 htmlCss 锚定标记上的边框底部填充,css,header,border,padding,Css,Header,Border,Padding,我在标题中有一个锚定标签,我试图在锚定标签上放置一个边框底部,这是可行的,但是底部的填充太大,负填充不起作用,我如何解决这个问题 生活 html <div id="featureText"> <h1>Recent Works / <a href="#">All</a></h1> </div> 我建议: #featureText h1 a { /* all your other CSS...
<div id="featureText">
<h1>Recent Works / <a href="#">All</a></h1>
</div>
我建议:
#featureText h1 a {
/* all your other CSS... */
display: inline-block;
line-height: 1em;
}
#featureText a {
line-height: 1em;
display: inline-block;
color: #414042;
text-decoration: none;
border-bottom: solid 2px #414042;
padding: 0;
}
#featureText h1 a {
/* all your other CSS... */
display: inline-block;
line-height: 1em;
}