背景图像html/css未更改
我刚开始写作,我正在做Dash的css简介。我一直在努力改变我正在制作的网站背景图片的大小。图像不会更改大小或对齐方式 固定的。谢谢背景图像html/css未更改,html,css,Html,Css,我刚开始写作,我正在做Dash的css简介。我一直在努力改变我正在制作的网站背景图片的大小。图像不会更改大小或对齐方式 固定的。谢谢 <!DOCTYPE html> <head> <title>#Name</title> <style> body { text-align: center; background-size: 80%;
<!DOCTYPE html>
<head>
<title>#Name</title>
<style>
body {
text-align: center;
background-size: 80%;
background-position: center;
background: url("http://upload.wikimedia.org/wikipedia/commons/1/13/Apollo_17_The_Last_Moon_Shot_Edit1.jpg") #Image that I am having a problem with.
}
h1 {
color: white;
}
p {
color: white;
}
</style>
</head>
<body>
<h1>#Name</h1>
<p>#Description</p>
<input type="email" placeholder="Your email here">
<input type="submit">
</body>
#名字
身体{
文本对齐:居中;
背景大小:80%;
背景位置:中心;
背景:url(“http://upload.wikimedia.org/wikipedia/commons/1/13/Apollo_17_The_Last_Moon_Shot_Edit1.jpg)#我有问题的图像。
}
h1{
颜色:白色;
}
p{
颜色:白色;
}
#名字
#描述
将背景
更改为背景图像
。background
是一个快捷码,它抵消了前面提到的所有面向background
的样式。将background
更改为background image
。background
是一个快捷码,它抵消了前面提到的所有面向background
的样式。background属性是设置一组设置的简写,第二个参数是图像url。您可能需要背景图像
,它会起作用。
请参见链接背景
属性是设置一系列设置的简写,第二个参数是图像url。您可能需要背景图像
,它会起作用。
有关图像的高度,请参见链接声明自动,使用禁止重复
,同时使用背景图像
body {
background-image: url("http://upload.wikimedia.org/wikipedia/commons/1/13/Apollo_17_The_Last_Moon_Shot_Edit1.jpg");
background-repeat: no-repeat;
text-align:center;
background-size: 80%;
background-position:center;
}
h1 {
color:white;
}
p {
color:white;
}
选中此项为图像高度声明自动,使用禁止重复
并使用背景图像
body {
background-image: url("http://upload.wikimedia.org/wikipedia/commons/1/13/Apollo_17_The_Last_Moon_Shot_Edit1.jpg");
background-repeat: no-repeat;
text-align:center;
background-size: 80%;
background-position:center;
}
h1 {
color:white;
}
p {
color:white;
}
选中此项将背景大小
放在背景
之后,背景
将覆盖所有与背景相关的内容,包括背景大小
,背景颜色
,背景位置
,…将背景大小
放在背景
之后,背景
将覆盖与背景相关的所有内容,包括背景大小
,背景颜色
,背景位置
。。。