gpt4 book ai didi

css - 从文本中删除蓝色突出显示

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

我正在使用自定义 CSS 按钮。每当我将鼠标悬停在它周围时,它就会在按钮内的文本下方突出显示蓝色(更像是蓝色下划线)。似乎无法弄清楚,尽管我付出了所有努力,但这似乎是徒劳的。

这是我的代码:

.btn {
box-sizing: border-box;
appearance: none;
background-color: transparent;
border: 2px solid #e74c3c;
border-radius: 0.6em;
color: #e74c3c;
cursor: pointer;
display: flex;
align-self: center;
font-size: 1rem;
font-weight: 400;
line-height: 1;
margin: 20px;
padding: 1.2em 2.8em;
text-decoration: none;
text-align: center;
text-transform: uppercase;
font-family: 'Montserrat', sans-serif;
font-weight: 700;
}

.btn:hover,
.btn:focus {
color: #fff;
outline: none !important;
}

.second {
border-radius: 3em;
border-color: #ec6800;
color: #FFF;
background: #ec6800;
background-position: 0 0;
background-size: 200%;
transition: background 150ms ease-in-out, color 150ms ease-in-out;
}
<nav class="navbar navbar-custom">
<div class="container">

<ul class="nav navbar-nav navbar-right">
<a href="signup.php"><button class="btn second">SIGN UP</button></a>
</ul>
<ul class="nav navbar-nav navbar-right">
<a href="signup.php"><button class="btn sixth">LOG IN</button></a>
</ul>

</div>

最佳答案

a{
text-decoration: none !important;
}
.nav a{
text-decoration: none !important;
}
.btn {
box-sizing: border-box;
appearance: none;
background-color: transparent;
border: 2px solid #e74c3c;
border-radius: 0.6em;
color: #e74c3c;
cursor: pointer;
display: flex;
align-self: center;
font-size: 1rem;
font-weight: 400;
line-height: 1;
margin: 20px;
padding: 1.2em 2.8em;
text-decoration: none;
text-align: center;
text-transform: uppercase;
font-family: 'Montserrat', sans-serif;
font-weight: 700;
}

.btn:hover,
.btn:focus {
color: #fff;
outline: none !important;
}

.second {
border-radius: 3em;
border-color: #ec6800;
color: #FFF;
background: #ec6800;
background-position: 0 0;
background-size: 200%;
transition: background 150ms ease-in-out, color 150ms ease-in-out;
}
<nav class="navbar navbar-custom">
<div class="container">

<ul class="nav navbar-nav navbar-right">
<a href="signup.php"><button class="btn second">SIGN UP</button></a>
</ul>
<ul class="nav navbar-nav navbar-right">
<a href="signup.php"><button class="btn sixth">LOG IN</button></a>
</ul>

</div>
</nav>

尝试将其添加到您的 CSS 代码中。

.nav a{
text-decoration: none !important;
}

关于css - 从文本中删除蓝色突出显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46514655/

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