Saturday, August 17, 2013

CSS bg image position pixels

<html>
<head>
<style type="text/css">
body
{
background-image: url('people.gif');
background-repeat: no-repeat;
background-attachment:fixed;
background-position: 50px 100px;
}
</style>
</head>

<body>
<p><b>Note:</b> For this to work in Firefox and Opera, the background-attachment property must be set to "fixed".</p>
</body>
</html>

Result

 

No comments: