Quantcast
Channel: Young Minds, Blog » CSS
Viewing all articles
Browse latest Browse all 5

Fixed Background Image

$
0
0

This article provides HTML fixed background code – code for fixing the background image of an HTML element so that it doesn’t scroll when its containing block scrolls.

To fix the position of a background image, use the CSS background-attachment property

You can see this exampel;

<div style="background-image:url(/pix/smile.gif);
background-repeat:repeat;
background-attachment:fixed;
overflow:scroll;
width:200px;
height:100px;">
 
</div>

WordPressStumbleUponShare


Viewing all articles
Browse latest Browse all 5

Trending Articles