當我試圖將按鈕置於左下方時,它可以工作,但是當我轉到其中一個按鈕並返回時,它的所有按鈕都有一個按鈕?另外一個,我需要向下滾動才能看到請幫忙CSS如何定位圖像右下角
HTML
<!Doctype html>
<html>
<head>
<title>Forsaken </title>
<link href="main.css" rel="stlesheet" type="text/css">
</head>
<body>
<a href="teams.html"><button><img class="#topleft" src="icon1.jpg " width="100%" alt="Teams" ></button></a>
<a href="store.html"><button><img class="#topright" src="icon2.jpg " width="100%" alt="store" ></button></a>
<a href="sponsors.html"><button><img class="#bottomleft" src="icon4.jpg " width="100%" alt="sponsors" ></button></a>
<a href="aboutus.html"><button><img class="#bottomright" src="icon3.jpg " width="100%" alt="aboutus" ></button></a>
</body>
</html>
CSS
#topleft {
position: fixed;
top: 0px;
left: 0px;
}
#topright {
position: fixed;
top: 0px;
right: 0px;
}
#left {
position: fixed;
left: 0px;
}
#right {
position: fixed;
right: 0px;
}
div {
border-style:solid;
border-width:0px;
border-color:#000000;
}
#yes {
border: none;
padding: 0;
background: none;
}
.flat {
border: none;
background: #222;
color: #FFF;
padding: 0px 0px;
font-size: 22px;
font-family: Palatino;
font-weight: bold;
}
.lighter {
background: #666;
}
#no {
border: none;
padding: 0;
background: none;
}
.flat {
border: none;
background: #222;
color: #FFF;
padding: 0px 0px;
font-size: 22px;
font-family: Palatino;
font-weight: bold;
}
.lighter {
background: #666;
}
PS其他所有的按鈕都工作,但關於我們一個。
你不必爲#bottomright和#bottomleft任何CSS?你的代碼也試圖做怪異的事情,所以我建議查找一些教程。 –
爲什麼你使用''標籤裏面的按鈕 –
#bottomright'和'#bottomleft' css –