发表于: 2017-03-13 21:18:10
1 749
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>护工个人主页</title>
<style type="text/css">
html{
font-size: 62.5%;
}
body{
min-width: 320px;
max-width: 1080px;
}
body,p,ul,li,ol{
margin: 0;
}
header,footer{
width: 100%;
height: 6rem;
font-size: 2rem;
position: fixed;
text-align: center;
}
header{
color: #fff;
background:#68cdd5;
line-height: 6rem;
top: 0;
}
main{
position: absolute;
width: 100%;
top: 6rem;
bottom: 6rem;
overflow: hidden;
}
.user-section{
position: relative;
height: 32rem;
background: url("icon1.png") no-repeat center;
background-size: cover;
}
.user-iamge{
position: absolute;
left: 2rem;
top: 50%;
transform: translateY(-50%)
}
.user-info{
position: relative;
top: 50%;
color: #fff;
margin-left: 15%;
transform: translateY(-50%)
}
.username{
font-size: 3rem;
padding-bottom: 1rem;
}
.location{
font-size: 2rem;
background: url("Shape.png") no-repeat left;
padding-left: 2.3rem;
}
footer{
display: flex;
bottom: 0;
}
.box{
width: 100%;
float: left;
}
.leftbox{
float: left;
margin: 1% 0;
margin-left: 2%;
width: 46%;
height: 4rem;
color: #68cdd5;
background: #fff;
border: solid #68cdd5;
border-radius: 1rem;
line-height: 4rem;
}
.rightbox{
float: left;
margin: 1% 0;
margin-left: 2%;
width: 46%;
height: 4rem;
color: #fff;
background: #68cdd5;
border: solid #68cdd5;
border-radius: 1rem;
line-height: 4rem;
}
</style>
</head>
<body>
<header style="background-image:url(back.png);background-repeat:no-repeat;background-position: 2%;background-size: auto">
个人主页
</header>
<main>
<div class="user-section">
<div class="user-iamge"><img src="woman.png" style="max-width: 100%"></div>
<div class="user-info">
<p class="username">切格瓦拉 99岁</p>
<p class="location">古巴.哈瓦那.白宫</p>
</div>
</div>
</main>
<footer>
<div class="box">
<div class="leftbox">留言</div>
<div class="rightbox">电话联系</div>
</div>
</footer>
</body>
</html>
评论