如何将背景图像保持在左下方甚至滚动

Fly*_*Cat 9 css position background-image

我想知道是否有办法让我的背景图像始终保持在左下方,即使用户滚动浏览器也是如此.我当前的css可以在网站加载时将图像放在浏览器的底部,但是如果我滚动浏览器,它仍将保留在同一位置.我感谢任何帮助.

html, body 
{
background-image:url("backgroundBottom.png");
background-position:bottom left;
background-repeat:no-repeat;
background-attachement:fixed;   //I just add this, don't think this would work.
font-family:"Georgia, self";
font-size:"30px";
margin:0px;
height:100%;
text-align:center;
}
Run Code Online (Sandbox Code Playgroud)

Mar*_*rko 20

您要在HTML和BODY元素上设置背景.

代码看起来不错,后台附件:修复是你需要的.

所以在简写CSS中,只需写

body {
    background: url(backgroundBottom.png) bottom left no-repeat fixed;
}
Run Code Online (Sandbox Code Playgroud)