【作业】about的底部没有高度

【作业】about的底部没有高度

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Career Builder</title>
<link rel="stylesheet" type="text/css" href=".\css\homework.css">
</head>
<body>
<!-- 顶部 -->
<div class="header">
<img src=".\images\logo.png" alt="logo">
<ul>
<li>&nbsp;&nbsp;HOME&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;ABOUT&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;GALLERY&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;FACULTY&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;EVENTS&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;CONTACT&nbsp;&nbsp;</li>
</ul>
</div>
<!-- banner -->
<div class="banner">
<img src=".\images\banner3.jpg" alt="banner">
<!-- 遮罩层 -->
<div class="above"></div>
<div class="text">
<input type="text" placeholder="  YOUR NAME">
<br>
<input type="text" placeholder="  YOUR PHONE">
<br>
<input type="text" placeholder="  YOUR EMAIL">
<input type="textarea" placeholder="  WHIRE YOUR COMMENT HERE" id="textarea">
<input type="button" value="SEND MESSAGE" id="button">
</div>
</div>
<!-- ABOUT -->
<div class="about">
<div class="about_top">
<div class="about_top_title">ABOUT</div>
<div class="line">——</div>
<div class="about_top_text">Lorem Ipsum is simply dummy text of the printing and typesetting<br> industry.Lorem Ipsum is simply dummy <br>text ever since the 1500s.</div>
</div>
<div class="about_bottom">
<div class="about_bottom_left">
<div class="about_bottom_left_title">A WORD <br>ABOUT US</div>
</div>
<div class="intro">
</div>
<div class="intro_content">
<div class="intro_content_text">
Preasent dignissim viverra est,sed <br> bbibendum ligula congue non.Sed ac nisl<br> et felis grvida commodo?Suspendisse<br> eget ullamcorper ipsum.Suspwndisse<br> diam amet.
</div>
<button id="explore">EXPLORE</button>
</div>
<div class="about_bottom_middle">
<img src=".\images\bb3.jpg" alt="bb3">
</div>
<div class="about_bottom_right">
<div class="about_bottom_right1">
<p class="num">70000</p>
<div class="line">——</div>
<p class="word">Students</p>
</div>
<div class="about_bottom_right2">
<p class="num">600</p>
<div class="line">——</div>
<p  class="word">Faculty</p>
</div>
</div>
</div>
<div class="bottom">

</div>
</div>
<div class="clear"></div>
<!-- gallery -->
<div class="gallery">
</div>
<div class="footer"></div>
</body>
</html>
*{
	margin: 0;
	padding: 0;
	font-family: "Microsoft YaHei UI";
}
.clear{
	clear: both;
}
.header{
	width: 100%;
	height: 60px;
	background-color: #07cbc9;
}
.header img{
	margin-left: 50px;
	float: left;
	margin-top: 5px;
}
.header ul{
	list-style: none;
	float: right;
	margin-right: 50px;
}
.header ul li{
	float: left;
	/*margin-left: 20px;*/
	font-size: 10px;
	color: #fff;
	font-weight: bold;
	text-align: center;
	line-height: 60px;
	cursor: pointer;
}
.header ul li:hover{
	background-color: black;
}

.banner{
	width: 100%;
	height:500px;
	background-color: #ddd;
}
.banner img{
	width: 100%;
	height: 500px;
}
.banner .above{
	width: 100%;
	height: 500px;
	background-color: #000;
	opacity: 0.5;
	position: absolute;
	top: 60px;
	left: 0;
}
.banner .text{
	width: 500px;
	height: 300px;
	/*background-color: #07cbc9;*/
	position: absolute;
	top: 150px;
	left: 50%;
	margin-left: -250px;
}
.banner .text input{
	/*border-radius: 0;*/
	width: 100%;
	height: 40px;
	border: 1px solid #ddd;
	background-color: transparent;
	margin-bottom: 20px;
	color: #C7C7CD;
}
.banner .text input:hover{
	border:2px solid #07cbc9;
}
.banner .text input#button:hover{
	border:2px solid #07cbc9;
	background-color: #07cbc9;
}
input:focus{
	outline:none;
		border: 1px solid #fff;
}
.banner .text input#textarea{
	height: 100px;
}
.banner .text input#button{
	margin-left: 175px;
	width: 160px;
	height: 55px;
	color: #ddd;
}

.about{
	width: 100%;
	height: 700px; 
	margin: 0 auto;
	/*background-color: #ddd;*/
}
.about .about_top{
	width: 100%;
	height: 200px;
	margin-top: 50px;
	background-color: #fff;
}
.about .about_top .about_top_title{
	width: 182px;
	font-size: 50px;
	font-weight: bolder;
	margin: 0 auto 20px;
}
.line{
	width: 30px;
	margin: -20px auto 0;
	font-weight: bolder;
	color: #07cbc9;
}
.about .about_top .about_top_text{
	width: 100%;
	margin-top: 20px;
	text-align: center;
	line-height: 2em;
	/*font-size: 10px;*/
	color: #999;
}
.about .about_bottom{
	width: 100%;
	height: 500px;
	margin-top: 10px;
	/*margin-left: 85px;*/
}
.about .about_bottom .about_bottom_left{
	width: 30%;
	height: 500px;
	/*background-color: red;*/
	float: left;
	
}
.about .about_bottom .about_bottom_left .about_bottom_left_title{
	font-size: 35px;
	margin-left: 300px;
}
.about .about_bottom .intro{
	width: 450px;
	height: 300px;
	border: 1px solid #777;
	position: absolute;
	top: 920px;
	left: 285px;
	z-index: 3;
	background-color: #fff;
	opacity: 0.5;
}
.about .about_bottom .intro_content{
	width: 400px;
	height: 300px;
	position: absolute;
	top: 950px;
	left: 315px;
	z-index: 5;
}
.about .about_bottom .intro_content .intro_content_text{
	font-size: 16px;
	letter-spacing: 1px;
	word-spacing: 3px;
	line-height: 2em;
}
#explore{
	width: 100px;
	height: 50px;
	margin-top: 30px; 
	color: #fff;
	background-color: #000;
	border: 2px solid #000;
}
#explore:hover{
	background-color: #fff;
	color: #000;
}
.about .about_bottom .about_bottom_middle{
	width: 40%;
	height: 500px;
	/*margin-left: -150px;*/
	/*margin-right: : 150px;*/
	/*background-color: blue;*/
	float: left;
}
.about .about_bottom .about_bottom_middle img{
	width: 100%;
	/*height: 100%;*/
}
.about .about_bottom .about_bottom_right{
	width: 30%;
	height: 500px;
	/*background-color: #ddd;*/
	float: right;
}
.about .about_bottom .about_bottom_right p.num{
	font-size: 40px;
	font-weight: bolder;
	text-align: center;
	line-height: 70px;
	margin-bottom: 15px;
}
.about .about_bottom .about_bottom_right p.word{
	font-size: 20px;
	text-align: center;
	line-height: 70px;
}
.about .about_bottom .about_bottom_right .about_bottom_right1{
	width: 250px;
	height: 150px;
	border: 1px solid #07cbc9;
	margin-left: 25px;
	margin-bottom: 25px;
}
.about .about_bottom .about_bottom_right .about_bottom_right2{
	width: 250px;
	height: 150px;
	border: 1px solid #07cbc9;
	margin-left: 25px;
}
.about .bottom{
	width: 100%;
	height: 700px;
	background-color: #000;
}

设置了宽高但是在浏览器显示不出来,审查元素发现没有高度。

请问老师应该怎么解决还有为什么会出现这种情况呢,谢谢老师。

正在回答

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

1回答

经过测试,在chrome中显示有高度, 如图,是否指这个高度:

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

在详细描述具体的问题和效果,以便更好帮助解决问题。加油!

  • Shylock_zh 提问者 #1
    是这个,但是在浏览器里打开就没有显示。。。我把全部css代码写到了html文件里面高度就出现了,不知道是不是我连接的时候有问题呢
    2018-03-21 10:47:28
  • Shylock_zh 提问者 #2
    谢谢老师
    2018-03-21 10:50:25
  • 小于飞飞 回复 提问者 Shylock_zh #3
    如果外部引用css 引用不正确,那所有的效果应该都没有,开发中,会有出现很多意想不到的效果,一步步排除和调整,最终会解决的。如有疑问将具体问题在提问区提问,会帮助解决的,加油!
    2018-03-21 11:02:45
问题已解决,确定采纳
还有疑问,暂不采纳

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

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

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

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

帮助反馈 APP下载

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

公众号

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

在线咨询

领取优惠

免费试听

领取大纲

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