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

php中文网
发布: 2016-06-24 12:16:47
原创
1180人浏览过

本帖最后由 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定义字体为黑色是为哪样

HTML速学教程(入门课程)
HTML速学教程(入门课程)

HTML怎么学习?HTML怎么入门?HTML在哪学?HTML怎么学才快?不用担心,这里为大家提供了HTML速学教程(入门课程),有需要的小伙伴保存下载就能学习啦!

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号