欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  web前端

请教URl样式问题_html/css_WEB-ITnose

程序员文章站 2024-01-23 12:34:04
...
本帖最后由 yangniehua001 于 2012-11-17 14:49:16 编辑


上图中的音箱 二字是带有超链接的,但是 字体样式却和没带链接的效果一样,这样完全看不出带链接,所以想在上面加个样式,效果如下图



下面是该网页的相关源码节选:
网页地址:http://www.97wanyong.cn/ktvjiqiao/59.html

代码:

现在电脑多数是集成声卡,独立声卡是在很老的电脑上才有的,但是现在的集成主板上也保留了独立声卡插口,所以想要唱歌必须得有好的硬件,声卡就是关键,一款好的音箱也必须也有好的声卡才能发挥他应有的效果,这里和大家介绍几款流行的,效果比较好的声卡,大家可以参考参考!

。。。。。。

下面是相关CSS源码:http://www.97wanyong.cn/statics/css/97wanyong_cn.css


.content_title{text-align:center;font:bold 1.8em "Lucida Grande",Helvetica,Arial,sans-serif;line-height:60px;}
.content_title_board{font:bold 14px "Lucida Grande",Helvetica,Arial,sans-serif;}
.content_info{width:95%;margin:auto;border-top:1px solid #eee;border-bottom:1px solid #eee;text-align:center;font:normal 12px 'Microsoft Yahei','Tahoma';line-height:25px;color:#555}
.content_description{margin:15px;padding:10px;text-indent:2em;border:1px solid #dedede;background:#eed;font:normal 12px "Lucida Grande",Helvetica,Arial,sans-serif;line-height:180%;color:#000;}
.content_text{width:92%;word-wrap:break-word;word-break:break-all;margin:20px auto;font-size:14px;font-family:Tahoma;line-height:25px;color:#000;}
.keylink{color:#333;}
.content_text *{font:normal 14px "Lucida Grande",Helvetica,Arial,sans-serif;line-height:180%;color:#000;}
.content_text p{text-indent:2em;margin:8px 0;}
.content_text_board {width:98%;margin:10px auto;font:normal 14px "Lucida Grande",Helvetica,Arial,sans-serif;line-height:180%;color:#000;}
.content_text_board *{word-wrap:break-word;word-break:break-all;font:normal 14px "Lucida Grande",Helvetica,Arial,sans-serif;line-height:180%;color:#000;}

.content_info .small{padding:0 5px;cursor:pointer;font:bold 8pt Arial;background:#ccc;}
.content_info .big{padding:0 5px;cursor:pointer;font:bold 12pt Arial;background:#fff;color:#049}
.content_toolbar{border-top:1px solid #dedede;height:30px;line-height:30px;}
.content_text img{MAX-WIDTH: 100%!important;HEIGHT: auto!important;width:expression(this.width > 600 ? "600px" : this.width)!important;}


请教为什么链接没样式,请大神指点


回复讨论(解决方案)


求指点

你可以试试用firebug或者chrome的开发者工具查看一下!
会发现你的css冲突了

比如

你有这样一条css语句:
a{
text-decoration:none;
}

这就导致了a都没有了样式。

咕~~(???)b a标签是带默认样式的??下划线蓝色字体。

.keylink{color:#333;}.content_text *{font:normal 14px "Lucida Grande",Helvetica,Arial,sans-serif;line-height:180%;color:#000;}

你这两段代码定义了字体颜色,一个灰色,一个黑色,我把这两段有关颜色的代码去掉后就正常了

.content_text *你使用的是通配符,content_text这个类选择器下的所有元素都将使用同种样式,你定义为了黑色,而a标签的id你选择的是keylink,这个也定义了颜色,为灰色,所以你的链接只有下划线,颜色为黑色,同周围的字是一个颜色,当然不好分辨了。html默认的字体颜色是黑色啊,看不明白你用content_text定义字体为黑色是为哪样

请教URl样式问题_html/css_WEB-ITnose

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。

相关文章

相关视频


相关标签: 请教URl样式问题