我的为啥跟老师的不一样?

我的为啥跟老师的不一样?

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>城市医院预约平台</title>
    <link rel="stylesheet" type="text/css" href="css.css">
</head>
<body>
    <div id="top" class="top">
        <div class="wrap">
            <p class="call">010-114/116114电话预约</p>
            <p class="welcome">
                欢迎来到城市医院预约挂号统一平台
                &nbsp;
                请
                &nbsp;
                <a href="#">登录</a>
                <a href="#">注册</a>
                &nbsp;&nbsp;&nbsp;&nbsp;
                <a href="#">帮助中心</a>
            </p>
        </div>
    </div>
    <div id="header" class="header">
        <div class="wrap">
            <a class="logo" href="#">
                <img src="logo.png" alt="">
            </a>
            <div class="search"></div>
        </div>
    </div>
    <div id="nav" class="nav">
        <div class="wrap">
            <div class="link menu">
                全部科室
                <div class="menu-list"></div>
            </div>
                <a href="#" class="link">按医院挂号</a>
                <a href="#" class="link">按科室挂号</a>
                <a href="#" class="link">按疾病挂号</a>
                <a href="#" class="link">最新公告</a>
                <a href="#" class="link rigth">社会知名医院</a>
        </div>
    </div>
    <div id="banner" class="banner">
        <div class="banner-slider"></div>
        <div class="banner-search"></div>
        <div class="banner-help"></div>
    </div>
    <div id="content" class="content">
        <div class="content-tab"></div>
        <div class="content-news"></div>
        <div class="content-close"></div>
    </div>
    <div id="footer" class="footer">
    </div>
</body>
</html>
body{
	margin: 0;
	padding: 0;
}
a{
	text-decoration: none;
}
.wrap{
	width: 1000px;
	margin: 0 auto;
	position: relative;
}
.top{
	height: 30px;
	background: #f5f5f5;
	line-height: 30px;
	color: #868686;
	font-size: 13px;
}
.header{
	height: 92px;
}
.nav{
	height: 36px;
	background: #60bff2;
}
.banner{
	width: 802px;
	margin: 0 auto;
	height: 414px;
	padding: 9px 0 0 198px;
	overflow: hidden;
}
.banner-slider{
	float: left;
	width: 544px;
	height: 414px;
	background: #8edff3;
}
.banner-search{
	float: right;
	width: 250px;
	height: 255px;
	background: #eee;
}
.banner-help{
	float: right;
	width: 250px;
	height: 146px;
	background: #ccc;
	margin-top: 12px;
}
.content{
	width: 1000px;
	margin: 0 auto;
	padding: 10px 0 38px 0;
	overflow: hidden;
}
.content-tab{
	float: left;
	width: 742px;
	height: 490px;
	background: #eee;
}
.content-news,.content-close{
	float: right;
	width: 248px;
	height: 236px;
	border: 1px solid #ccc;
}
.content-close{
	margin-top: 12px;
	border-color: red;
}
.footer{
	height: 132px;
	padding: 25px;
	background: #eceef2;
}
p{
	margin: 0;
	padding: 0;
	display: inline-block;
}
.top .call{
	float: left;
	padding-left: 20px;
	background: url('icon-call.png') no-repeat center left;
}
.top .welcome{
	float: right;
}
.top a{
	color: #4da5e1;
	padding-left: 10px;
}
.header .logo{
	width: 402px;
	height: 74px;
	padding: 9px 0;
	display: inline-block;
}
.header .logo img{
	width: 100%;
	height: 100%;
}
.header .search{
	width: 326px;
	height: 38px;
	position: absolute;
	right: 0px;
	top: 29px;
	background: orange;
}
.nav .link{
	display: inline-block;
	float: left;
	padding-left: 30px;
	line-height: 36px;
	color: #d7f3ff;
	font-size: 16px;
	min-width: 80px;
	text-align: center;
}
.nav a:hover{
	color: #d7f3ff;
}
.nav .menu{
	width: 130px;
	padding-right: 30px;
	background: #1fa4f0;
	position: relative;
}
.nav .menu .menu-list{
	background: #1fa4f0
	width: 100%;
	height: 423px;
	position: absolute;
	left: 0;
	top: 36px;
}

正在回答

登陆购买课程后可参与讨论,去登陆

1回答

同学你好,你说的效果不一样是指的全部科室下面的蓝色内容框没有出现吗?

没有出现的原因是在css样式中,丢失了一个;结尾,参考下图:

http://img1.sycdn.imooc.com//climg/5c6a1a16000143f905060256.jpg

每写完一个css样式,就需要使用;来结尾。

测试一下哦,如果帮助到了你,欢迎采纳。

祝学习愉快!

  • 三年没洗澡 提问者 #1
    谢谢老师,我找了很久都没有找到原因,你是怎么找出来的?
    2019-02-18 11:28:42
  • 山河远阔ZZ 回复 提问者 三年没洗澡 #2
    老师是结合开发者工具来差错的, 先找到出问题的布局,看看是否某个css样式没有添加上或者是css属性写错,这样问题就能一下子找到了。
    2019-02-18 11:52:44
问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
请稍等 ...
微信客服

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

帮助反馈 APP下载

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

公众号

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

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师