gpt4 book ai didi

html - CSS - Nav a 标签在 Safari 中有下划线

转载 作者:太空宇宙 更新时间:2023-11-04 01:31:45 24 4
gpt4 key购买 nike

<a>我的导航栏上的标签有一个仅在 Safari 上显示的链接下划线。我该如何摆脱它?我已经有了 text-decoration: none;应该删除它但不是。以前从未见过 -

enter image description here

紫色线是 border-bottom ,它是我需要删除的直接黑色下划线。

这是我的代码——

header {
height: 50px;
background-color: #fff;
}

nav {
overflow: hidden;
text-align: center;
padding: 10px;
background-color: #fff;
position: fixed;
top: 0;
width: 100%;
z-index: 999;
}

nav a {
color: #000000;
transition: all 0.2s ease-in-out 0s;
text-decoration: none;
display: inline-block;
padding: 15px 15px 5px 15px;
border-bottom: 2px solid transparent;
}

nav a:link {
color: #000000;
text-decoration-line: none;
}

nav a:nth-of-type(1):hover {
border-color: rgb(255, 29, 142);
}

nav a:nth-of-type(2):hover {
border-color: rgb(133, 52, 146);
}

nav a:nth-of-type(3):hover {
border-color: rgb(255, 128, 55);
}

nav a:nth-of-type(4):hover {
border-color: rgb(0, 182, 223);
}

nav a:nth-of-type(5):hover {
border-color: rgb(63, 190, 150);
}

nav a:nth-of-type(6):hover {
border-color: rgb(255, 222, 32);
}

nav a:hover {
color: #000000;
}
<header>
<nav>
<a href="<?php the_permalink(4); ?>#particle-slider">Home</a>
<a href="#what">What we do</a>
<a href="#who">Who we are</a>
<a href="#partners">Who we work with</a>
<a href="#contact">Say hello</a>
<a href="<?php the_permalink(70); ?>">Blog</a>
</nav>
</header>

最佳答案

只是弄明白了,把它作为答案有点尴尬,但它只在 Safari 中显示该行这一事实让我有点吃惊。

nav a:hover {
color: #000000;
text-decoration: none;
}

关于html - CSS - Nav a 标签在 Safari 中有下划线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46963659/

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