background-attachment-fixed

'Background-attachment' with value 'fixed'

WeasyPrint

This browser

Flags
interact
Assertion
If 'background-attachment' is given the value 'fixed,' then the background image remains fixed in relation to the user agent viewport when the viewport is scrolled.

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html xmlns="http://www.w3.org/1999/xhtml"><head>
 3 		<title>
 4 			CSS Test: 'Background-attachment' with value 'fixed'
 5 		</title>
 6 		<link href="mailto:job@twobanjos.com" rel="author" title="Melanie Archer">
 7 		<link href="http://www.w3.org/TR/css3-background/#the-background-attachment" rel="help">
 8 		<meta content="interact" name="flags">
 9 		<meta content="If 'background-attachment' is given the value 'fixed,' then the background image remains fixed in relation to the user agent viewport when the viewport is scrolled." name="assert">
10 <style type="text/css">
11 	#test-container {
12 		background-attachment: fixed;
13 		background-position: 1em 5em;
14 		background-image: url("support/cat.png");
15 		background-repeat: no-repeat;
16 		border: 1px solid blue;
17 		height: 250px;
18 		overflow: scroll;
19 		width: 250px;
20 	}
21 
22         </style>
23 	</head>
24 	<body>
25 		<p>
26 			Test passes if the cat image does not move when the blue-bordered containing block or the viewport is scrolled.
27 		</p>
28 		<div id="test-container">
29 			Cupcake ipsum dolor sit. Amet applicake bonbon chocolate cake ice cream. Bear claw tootsie roll cotton candy biscuit. Sweet roll chupa chups gingerbread sugar plum icing muffin biscuit. Chocolate cake wafer pastry tart macaroon danish topping ice cream. Jujubes liquorice candy canes faworki. Jujubes cake caramels faworki pie cake sweet roll. Tiramisu sesame snaps candy cheesecake brownie souffle biscuit. Danish chupa chups donut. Donut tart marshmallow biscuit lollipop chupa chups jelly beans faworki. Sugar plum wafer faworki marshmallow brownie ice cream cotton candy marshmallow marzipan. Cheesecake gummi bears cupcake sweet croissant cookie chocolate bar sweet roll. Halvah cupcake carrot cake souffle carrot cake chocolate cake pastry gummi bears muffin. Sweet roll candy gingerbread dessert tart. Pastry oat cake jelly beans.
30 		</div>
31 	
32 
33 </body></html>