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

求大神帮我看看啊

@charset"UTF-8";
*
{
	margin: 0;
	padding: 0;
	font-size: 12px;
}
body
{
	background-color: #F5F5F5;
}
.top
{
	width: 100%;
	height:27px;
	background: url(../images/top_bg.jpg) repeat-x;
}
.top_content
{
	width: 1000px;
	margin: 0 auto;
}
.top_content li
{
	list-style-image:url(../images/li_bg.gif); 
	float: right;
	width: 70px;
	line-height: 27px;
}
.top_content a:link,.top_content a:visited
{
	color:gray;
	text-decoration: none;
}
.top_content a:hover,.top_content a:active
{
	color: red;
	text-decoration: none;
}

.wrap
{
	width: 1000px;
	margin: 0 auto;
}
.logo
{
	height: 80px;
	background-color: white;
}
.logo_left
{
	width: 200px;
	float: left;
}
.logo_right
{
	margin-top:30px; 
	width: 300px;
	float: right;
	color: gray;
}
.logo_right img
{
	vertical-align: middle;
	margin-right: 10px;
}
.tel
{
	font-family: "微软雅黑";
	font-size:16px;
	color: red;
}
.nav
{
	height: 40px;
}
.nav_left
{
	width: 10px;
	background: url(../Images/nav_left.jpg) no-repeat;
	float: left;
}
.nav_mid
{
	width: 980px;
	background: url(../Images/nav_bg.jpg) repeat-x;
	float: left;
}
.nav_right
{
	width: 10px;
	background: url(../Images/nav_right.jpg) no-repeat;
	float: left;
}

下面是HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<link href="css/main.css" rel="stylesheet" type="text/css"/>
<script src="JS/setHomeSetFav.js" type="text/javascript" charset="gb2312"></script>
</head>
<body>
<div>
<div>
<ul>
<li><a href="http://www.bilibili.com/html/contact.html">联系我们</a></li>
<li><a href="#" onclick="AddFavorite(window.location,document.title)">加入收藏 </a></li>
<li><a href="#" onclick="SetHome(window.location)">设为首页</a></li>
</ul>
</div>
</div><!-- top结束 -->
<div>
<div>
<div>
<img src="Images/logo.jpg" alt="慕课网"/>
</div>
<div>
<img src="Images/tel.jpg" alt="服务热线"/>24小时服务热线:<span>123-456-7890</span>
</div>
</div><!-- logo结束 -->
</div><!-- wrap结束 -->
<div>
<div></div>
<div>
<div>
<ul>
<li><a href="#">首页</a></li>
<li><a href="list.html">关于慕课</a></li>
<li><a href="list.html">新闻动态</a></li>
<li><a href="list.html">课程中心</a></li>
<li><a href="list.html">在线课程</a></li>
<li><a href="list.html">人才招聘</a></li>
</ul>
</div>
<div></div>
</div><!-- nav_middle结束 -->
<div>
<form action=""method="post">
<input type="text"/>
</form>
</div>
</div><!-- nav结束 -->
</body>
</html>

在浏览器上的结果是http://img1.sycdn.imooc.com//55a3268700015cf113660645.jpg

这是怎么回事?

正在回答

1 回答

好吧我自己找出原因了。。。

0 回复 有任何疑惑可以回复我~
#1

妖梦萌

什么能分享一下吗
2015-07-22 回复 有任何疑惑可以回复我~
#2

北条纱希 提问者 回复 妖梦萌

最前面改成<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 然后<form></form>这个元素应该放到<!-- nav_middle结束 -->这个DIV里面才对,至于原因嘛,应该是如果出了制定的DIV下面的CSS就对FORM这个元素不起作用了。
2015-07-23 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

求大神帮我看看啊

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号