我已經在html和css中編寫了一些帶有文本和圖片的網站,但是我不知道如何用它覆蓋圖片(如何用圖片疊加圖片)。CSS/HTML與文本疊加圖像?
HTML:
<!DOCTYPE html>
<html lang ="de">
<head>
<title>SirMarkypus | Homepage</title>
<link href="homepage.css" rel="stylesheet" type="text/css">
<meta charset="utf-8">
</head>
<body>
<h1 id="headline1">Willkommen auf dem SirMarkypus-Server!</h1>
<img id="backgrounder1" src="img/backgrounder.png" alt="SirMarkypus-
Backgrounder">
</body>
</html>
CSS:
body {
background: gray;
}
#backgrounder1 {
position: absolute;
top: -60px;
width: 1910px;
height: 720px;
}
#headline1 {
position: relative;
margin: 0px;
padding: 10px;
text-align: center;
font-family: "Verdana";
font-size: 48px;
color: #FFF;
}
爲什麼不H1本身使用的背景圖片? –
@Nawed Khan我該怎麼做? – SirMarkypus