为了账号安全,请及时绑定邮箱和手机立即绑定

为什么  <div>33333</div>这里不是显示绿色,然后点击<a>的效果出不来...不点击出不来绿色

为什么  <div>33333</div>这里不是显示绿色,然后点击<a>的效果出不来...不点击出不来绿色

慕粉3564441 2017-01-08 00:01:32
@charset "utf-8";/* CSS Document */*{margin:0;padding:0;font-size:12px;}<!-- background-color:F5F5F5;-->body{ background-color:#0F0;  }.top{ width:100%; height:27px; background:url(../image/top_bg.jpg) repeat-x ;}.top_content{width:1000px;margin:0  auto;}.top_content li{ list-style-image:url(../image/li_bg.gif); float:right; width:70px; line-height:27px;}<!--a:link {color: #FF0000} 未访问的链接 a:visited {color: #00FF00} 已访问的链接 a:hover {color: #FF00FF} 鼠标移动到链接 a:active {color: #0000FF} 选定的链接 --> .top_content ul li a:link, .top_content ul li a:visited{ color:#0F0; text-decoration:none; }.top_content ul li a:hover, .top_content ul li a:active{color:#F06;text-decoration:none; }<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title><!--/*Link标签有两个作用:1. 定义文档与外部资源的关系;2. 是链接样式表。 href 为 URL地址; type为链接文件的格式; rel 该属性规定当前文档与被链接文档之间的关系。但是,只有 rel 属性的 "stylesheet" 值得到了所有浏览器的支持。其他值只得到了部分地支持。stylesheet 文档的外部样式表。  *--><link href="css/main.css" rel="stylesheet" type="text/css" /><script src="js/setHomeSetFav.js" type="text/javascript" charset="gb2312"></script></head><body><div class="top">  <div class="top_content">      <ul>       <li><a herf="#">联系我们</a></li>       <li><a herf="#" onclick="AddFavorite(window.location,document.litle)">加入收藏</a></li>       <li><a herf="#" onclick="SetHome(window.location)">设为首页</a></li>                      </ul>    </div></div>  <div>33333</div></body></html>
查看完整描述

3 回答

?
chage0527

TA贡献3条经验 获得超1个赞

你的问题让人看不懂!!!!

针对我的理解,有这些问题:

首先你css里面的注释就不对,css的注释是用/**/,HTML注释用<!--...-->

其次,像楼上说的, <div>33333</div>没定义,哪来的样式?

最后,先把自己的代码整理清楚了再问问题!


查看完整回答
反对 回复 2017-01-09
?
heimugua

TA贡献1条经验 获得超0个赞

楼上正解,你什么也没定义
查看完整回答
反对 回复 2017-01-09
?
MarlboroKay

TA贡献189条经验 获得超236个赞

 <div>33333</div> 没有对应的样式。望采纳!

查看完整回答
反对 回复 2017-01-08
  • 3 回答
  • 0 关注
  • 1402 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信