Saturday, August 17, 2013

CSS bg image position percent

<html>
<head>
<style type="text/css">
body
{
background-image: url('people.gif');
background-repeat: no-repeat;
background-attachment:fixed;
background-position: 30% 20%;
}
</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: