html - 当我将导航栏背景设置为透明时,为什么会有一条细黑线?
问题描述
我正在尝试使我的导航栏透明,但是没有明显原因出现一条细黑线。这是它的样子: https ://teampolair.com
我的 CSS 在这里:
.topnav {
background-color: transparent;
overflow: hidden;
margin-bottom: 0;
position: fixed;
top: 0;
width: 100%;
z-index: 100;
font-size: 18px;
}
.topnav b {
float: right;
padding: 0px 1em;
}
.topnav b img {
height: 2.8em;
width: auto;
padding-top: .56em;
}
.topnav a {
color: #E0E0E0;
text-align: center;
float: left;
padding: 0.78em 1em;
text-decoration: none;
font-size: 1em;
}
.topnav a:hover {
background-color: #E0E0E0;
color: #302F2F;
}
.topnav a.active {
background-color: #454544;
}
.topnav.scrolled {
background-color: #000000;
transition: background-color 200ms linear;
}
我相信,topnav 中唯一应该影响他的部分是与“a”相关的任何内容。有人能帮我解决我的问题吗?
解决方案
“main.css”的第 247 行有一条 CSS 规则,a
其中包含border-bottom: dotted 1px rgba(0, 0, 0, 0.25);
. 如果你删除它,你的问题就解决了。
推荐阅读
- scala - 在 Scala 中,如何在执行期间找到有效的隐式方法、声明和转换
- three.js - THREE.js 辅助摄像机在 VR 中随头部旋转而旋转
- javascript - 无法发送到特定客户端:Socket IO 将其发送到每个客户端?
- asp.net-core - 从带有 EF Core 的 asp.net 核心中的视图插入到多对多关系
- javascript - 如何在没有扩展名的 URL 上触发文件下载
- java - Gradle (java):测试任务应该使用生成的 .jar 而不是类路径中的 .class 文件
- c++ - 如何在 C++ 中使用接口
- clojure - Clojure 哈希算法
- c++ - 在 switch 语句中分配 lambda
- c# - 扩展动态调度以调用视图模型中的函数?