background-attachment

The background-attachment property is used to specify whether or not the background image scrolls with the document. The possible values are.
PropertiesDescription
fixedthe image is fixed relative to the view-port
scrollthe image is fixed relative to the document, and the two will be scrolled together (the default value)
snippet
<html>
<head>
    <style>
        p {width:300px; height:250px; background-image: url(bg.jpg)}
    </style>
</head>
<body>
    <form>
        <p style="background-attachment: fixed; overflow: fixed">
		Commodi numquam adipisci sit consequatur vitae saepe beatae, vero sit dignissimos 
		harum accusamus fuga iusto facilis expedita omnis beatae, dolorum perferendis harum 
		blanditiis nemo cumque dignissimos recusandae a aliquid, laboriosam</p>
        <p style="background-attachment: fixed; overflow: scroll">
                Commodi numquam adipisci sit consequatur vitae saepe beatae, vero sit dignissimos 
		harum accusamus fuga iusto facilis expedita omnis beatae, dolorum perferendis harum 
		blanditiis nemo cumque dignissimos recusandae a aliquid, laboriosam</p>
    </form>
</body>
</html>
Related Tutorial
Follow Us
https://www.facebook.com/Rookie-Nerd-638990322793530 https://twitter.com/RookieNerdTutor https://plus.google.com/b/117136517396468545840 #
Contents +