Make a background image static?
So, I'm trying to make the background image static, and have the f开发者_如何学编程oreground content move over it. Having some issues, what am I doing wrong? Here is my current code.
body
{
color: #000;
margin: 10px 0px 10px 0px;
background-color: #ffffff;
background-image:url('http://userlogos.org/files/backgrounds/Mafia_Penguin/Map1280x800.jpg');
background-repeat:no-repeat;
font-family: Arial, Helvetica, sans-serif;
}
You need to set the background-attachment
property to fix the background image.
background-attachment: fixed;
精彩评论