Rob*_*olo 3 css hyperlink hover text-styling
我有这个HTML代码
<a href="test.html">
<div class=" menubox mcolor1">
<h3>go to test page</h3>
</div>
</a>
Run Code Online (Sandbox Code Playgroud)
这就是css
.menubox {
height: 150px;
width: 100%;
font-size: 14px;
color: #777;
margin: 0 0 0 0;
padding: 0;
-moz-border-radius: 10px;
border-radius: 10px;
position: relative;}
.mcolor1 { background: #3A89BF url(../images/prod2.png) no-repeat center center; }
Run Code Online (Sandbox Code Playgroud)
鼠标悬停此div,文本显示超链接线,我该如何隐藏它?
正如其他人所建议的那样,从链接中删除下划线很容易.但是,如果您只需要定位此特定链接,请尝试给它一个类.例:
.no-underline:hover {
text-decoration: none;
}Run Code Online (Sandbox Code Playgroud)
<a href="test.html" class="no-underline">
<div class=" menubox mcolor1">
<h3>go to test page</h3>
</div>
</a>Run Code Online (Sandbox Code Playgroud)