请问文字不能居中显示的原因
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>homeword</title>
<link rel="stylesheet" type="text/css" href="..\\css.css\\homeword.css">
</head>
<body>
<!-- 页面头部 -->
<div class="header">
<div class="logo"><img src="..\\picture.png\\images\\logo.png" alt="LOGO"></div>
<div class="list">
<ul>
<li>HOME</li>
<li>ABOUT</li>
<li>GALAERY</li>
<li>FACULTY</li>
<li>EVENTS</li>
<li>CONTACT</li>
</ul>
</div>
<div class="clear"></div>
</div>
<!-- 页面banner区 -->
<div class="banner"><img src="..\\picture.png\\images\\banner3.jpg"></div>
<!-- 遮罩层 -->
<div class="toplayer"></div>
<!-- 表单层 -->
<div class="bdc"><form>
<input type="text" name="" placeholder="your Name">
<br>
<br>
<input type="text" name="" placeholder="your Phone">
<br>
<br>
<input type="email" name="" placeholder="your Email">
<br>
<br>
<input type="textarea" name="" placeholder="Write Your Comment Here" id="textarea">
<br>
<button>SEND MESSAGE</button>
</form></div>
<!-- 页面about区 -->
<div class="about">
<div class="head">
<div class="title">ABOUT</div>
<hr>
<div class="wenzi">Lorem Ipsum is simply dummy text of the printing and typesetting industry.Lorem Ipsum has been the industry's standerd dummy text ever since the 1500s</div>
<div><img src="..\\picture.png\\images\\bb3.jpg"></div>
<div class="num">
<div class="num1"></div>
<div class="num2"></div>
</div>
</div>
<div class="foot"></div>
<!-- </div> -->
<!-- 页面gallery区 -->
<div class="gallery"></div>
<!-- 页脚区 -->
<div class="footer"></div>
</body>
</html>
*{
margin: 0;
padding: 0;
font-family: Microsoft YaHei UI;
}
.header{
width: 100%;
height: 100px;
background-color:#07cbc9;
/*position: fixed;
top: 0;
left: 0;*/
}
.header .logo{
float: left;
}
.header .list{
float: right;
}
.clear{
clear: both;
}
.header .logo img{
padding-left: 70px;
padding-top: 20px;
}
.header .list ul{
list-style: none;
padding-right: 80px;
}
.header .list ul li{
float: left;
width: 100px;
line-height: 100px;
text-align: center;
}
.header .list ul li:hover {
background-color: #000;
color: white;
}
.banner{
width: 100%;
height: 550px;
}
.banner img{
width: 100%;
height: 550px;
}
.toplayer{
width: 100%;
height: 550px;
position: absolute;
top: 100px;
left: 0px;
opacity: 0.3;
background-color: #000;
}
.bdc{
width: 400px;
height: 400px;
position: absolute;
top: 200px;
left: 50%;
margin-left: -200px;
z-index: 9;
opacity: 0.8;
}
.bdc form input{
width: 400px;
height: 40px;
background-color: #000;
opacity: 0.5;
}
input:hover{
border:2px solid #07cbc9;
}
button{
margin-top:20px;
margin-left: 75px;
width: 250px;
height: 50px;
line-height: 30px;
}
#textarea{
height: 100px;
}
.about{
height: 1000px;
/*background-color: yellow;*/
}
.title{
text-align: center;
font-weight: bolder;
font-size: 25px;
padding-top: 50px;
}
hr{
width: 30px;
height: 1px;
margin-top: 10px;
background-color: #07cbc9;
}
}
.wenzi{
width: 550px;
margin:20px auto;
text-align: center;
}
为什么不能居中显示呢
正在回答 回答被采纳积分+1
相似问题
登录后可查看更多问答,登录/注册
- 参与学习 人
- 提交作业 1088 份
- 解答问题 10205 个
如果你有Java语言基础,又想以后从事Java Web开发,那么本路径是你的不二选择!本路径从网页搭建开始入手,通过大量案例来学习Java Web基础。定能助你完成Java Web小白的蜕变!
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星