08-项目:网页布局案例
1-1
电脑:E:前端工程师—前端零基础入门—步骤二:页面化妆师CSS—08-项目:网页布局案例----1
u盘:前端工程师—前端零基础入门—步骤二:页面化妆师CSS—08-项目:网页布局案例----1
1-2
<!DOCTYPE html>
<html>
<head>
<title>3</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<style type="text/css">
*{
margin: 0;
padding: 0;
}
img{
width: 380px;
height: 240px;
}
.zhezhao{
position: absolute;
width: 380px;
height: 240px;
top: 0;
left: 0;
background-color: black;
z-index: 1;
opacity: 0.5;
}
</style>
</head>
<body>
<div>
<img src="https://climg.mukewang.com/58f829ca00010be703840240.jpg">
</div>
<div class="zhezhao"></div>
</body>
</html>
1-3
<!DOCTYPE html>
<html>
<head>
<title>3</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<style type="text/css">
.box{
width: 500px;
height: 200px;
margin: 0 auto;
border: 1px solid #aaa;
background-color: #ababab;
color: #fff;
font-weight: bolder;
position: relative;
}
.box div{
width: 300px;
height: 46px;
text-align: center;
position: relative;
top: 50%;
margin-top: -23px;
left: 50%;
margin-left: -150px;
}
</style>
</head>
<body>
<div class="box">
<div>
欢迎大家来到慕课网学习!<br>
来到慕课网学习!
</div>
</div>
</body>
</html>
1-4
<!DOCTYPE html>
<html>
<head>
<title>3</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<style type="text/css">
*{
margin: 0;
padding: 0;
}
.box{
width: 1000px;
text-align: center;
margin: 0 auto;
}
.box .box1{
padding-top: 30px;
font-family: "微软雅黑";
padding-bottom: 10px;
font-size: 20px;
}
.box .box2{
overflow: hidden;
zoom:1;
}
.box .box2 dl{
width: 470px;
float: left;
margin: 5px 3px;
}
.box .box2 dl dd{
padding-top: 20px;
}
</style>
</head>
<body>
<div class="box">
<div class="box1">ENJOY THE LIFE</div>
<div class="box2">
<dl>
<dt><img src="http://climg.mukewang.com/58f829090001a4b504260240.jpg"></dt>
<dd>Life is like a book, just read more and more refined, more write more carefully. When read, mind open, all things have been indifferent to heart. Life is the precipitation.</dd>
</dl>
<dl>
<dt><img src="http://climg.mukewang.com/58f8290f0001558804260240.jpg"></dt>
<dd>Life is like a book, just read more and more refined, more write more carefully. When read, mind open, all things have been indifferent to heart. Life is the precipitation.</dd>
</dl>
</div>
</div>
</body>
</html>