CSS链接无法正常工作
问题描述:
“request”div中的链接无法正确显示。对于在style.css的这个div链接有以下代码:CSS链接无法正常工作
.header .request a span{border-bottom:1px dotted}.header .request a:hover span{border-bottom:0}
证明:berdyanskaya56.ru
在页面而链接徘徊她成为下划线。相比之下,.css清楚地表明它应该是没有装饰的。我怎样才能解决这个问题?
UPD: - > goal:使div中的链接“请求”虚线underlinead,而在隐藏和非托盘的同时盘旋。链接样式的所有属性都应该以.css而不是html格式(不要在index.html中写入style =“text-decoration:none”)。
- >目前情况:链接点缀下划线,但它变成下划线(___),而不是非下划线,而徘徊。
答
这工作正常。只需添加
div.header div.request a {
text-decoration: none;/*add this*/
}
.header .request a span {
border-bottom: 1px dotted
}
.header .request a:hover span {
border-bottom: 0
}
div.header div.request a {
text-decoration: none;
}
<div class="header">
<div class="request">
<a href="#">
<span>sadsad</span>
</a>
</div>
</div>
答
添加下面的风格在你的CSS。
.header .request a:hover{text-decoration:none;}
+0
它不起作用。我发现如果你添加style =“text-decoration:none;”到页面上的链接,它修复。我的目标是将这个属性包含在.css中。 – RLearnsR 2014-10-30 06:54:40
答
.header .request a span {
text-decoration: none;
border-bottom: 1px dotted;
}
删除border:0
在这里和在这个CSS添加text-decoration: none;
.header .request a:hover{
text-decoration:none;
}
悬停我正在修改border-bottom:none;
.header .request span:hover{
border-bottom:none;
}
UPADTE这个CSS我希望这将解决您的问题
你需要指定你想在这里实现什么? **如果你提供了一些URL链接,并希望检查'request div',它根本不可能**。没有人会理解,至少我不明白你的说法。解释将有助于解决您的问题 – 2014-10-30 07:46:46
更新了问题。 – RLearnsR 2014-10-30 08:10:40