如何將我的頁腳徽標像我的頭標誌? 我想創建這樣頁眉和頁腳徽標
-------------------------
| __________ |
|______| HeadLogo |____ |
| |_________ | |
| |
| |
| |
| ______________ |
|---| FootLogo |----|
| --------------- |
|_______________________|
預覽我的網頁 https://db.tt/EsMHtRpF
我的HTML
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test</title>
<link rel="stylesheet" type="text/css" href="css.css" />
</head>
<body>
<div class="all">
<div class="middle">
</div>
<div class="top">
<img src="images/head.png" class="top-img"></img>
</div>
<div class="bottom">
<img src="images/foot.png"></img>
</div>
</div>
</body>
</html>
我的CSS
@charset "UTF-8";
@import url("http://fonts.googleapis.com/css?family=Varela+Round");
* {
padding:0px;
margin:0px;
}
html, body {
background-color:#b3924a;
max-height:100%;
max-width:100%;
}
.all {
max-height:100%;
height:auto;
overflow:hidden;
display:inline-block;
media:screen;
}
.top {
background-color:#d7cc75;
width:100%;
height:9%;
position:absolute;
top:0px;
text-align:center;
z-index:1;
}
.top-img {
position:relative;
width:17%;
height:auto;
z-index:1;
top:1em;
}
.bottom {
background-color:#d7cc75;
width:100%;
height:7%;
position:absolute;
bottom:0px;
text-align:center;
overflow:hidden;
z-index:1;
}
.bottom img {
width:25%;
height:auto;
z-index:1;
}
謝謝:d
按照這個的jsfiddle http://jsfiddle.net/4vZAB/,一切看起來都很好,很正常。嘗試添加圖片,看看它的外觀 – anurupr
瑜珈:感謝我的修訂預覽 –
anurupr:對不起,我的意思是身體和底部之間footlogo,但感謝你的幫助 –