这是我的代码和链接:
(顺便说一句,我尝试了所有操作,例如添加img和添加position: 100%;
,但没有任何效果)
http://dash.ga.co/mcampb/build-your-own-personal-website
body {
text-align: center;
background: url("https://i.imgur.com/YGc2Dtx.gif");
background-size: cover;
background-position: center;
color: white;
font-family: chiller;
}
p {
font-size: 52px;
}
input {
border: 15;
padding: 10px;
font-size: 18px;
}
input[type="submit"] {
background: green;
color: white;
}
<body>
<img src="https://i.imgur.com/wDVrcNim.jpg">
<p> I'm Mugdea, a NYC horror writer. Say boo!</p>
<input type="email" placeholder="Your email">
<input type="submit"> enter code here
</body>
我试图弄清楚如何在页面上向下移动图像,但是当我仅尝试向下移动图像时,我一直在移动背景图像。不幸的是,我似乎找不到在页面上更下方的图像代码的任何地方的代码。
最佳答案
我将图像向下放置在html中
<!DOCTYPE html>
<head>
<title>Mugdea</title>
<style>
body {
text-align: center;
background: url("https://i.imgur.com/YGc2Dtx.gif");
background-size: cover;
background-position: center;
color:white;
font-family: chiller;
}
p {
font-size: 52px;
}
input {
border: 15;
padding: 10px;
font-size: 18px;
}
input[type="submit"] {
background: green;
color: white;
}
</style>
</head>
<body>
<p> I'm Mugdea, a NYC horror writer. Say boo!</p>
<input type="email" placeholder="Your email">
<input type="submit">
<img src="https://i.imgur.com/wDVrcNim.jpg">
enter code here</body>
关于html - 尝试将图像进一步向下移动,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/49756249/