clipping-006

CSS clipping test

WeasyPrint

This browser

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 3 <head>
 4 <title>CSS Test: CSS clipping test</title>
 5 <link rel="author" title="David Hyatt" href="mailto:hyatt@netscape.com">
 6 <link rel="help" href="http://www.w3.org/TR/CSS21/visufx.html#overflow">
 7 <style type="text/css">
 8 .green {
 9   width: 100px;
10   height: 100px;
11   background-color: green;
12   left: 100px;
13   top: 70px;
14 }
15 
16 .red {
17   width: 100px;
18   height: 100px;
19   margin-top: 100px;
20   margin-left: 100px;
21   background-color: red;
22 }
23 
24 .overflow {
25   overflow: hidden;
26   width: 100px;
27   height: 100px;
28 }
29 
30 .positioned {
31   position: fixed;
32 }
33 </style>
34 </head>
35 <body>
36 
37 <p>Test passes if there is <strong>a green square</strong> and <strong>no red</strong>.</p>
38 
39 <!--  This test is checking to make sure overflow is done using a containing
40 block model, and that a fixed positioned element inside another fixed positioned
41 element is not considered overflow. -->
42 
43 <div class="overflow positioned">
44 <div class="red"></div>
45 <div class="green positioned"></div>
46 </div>
47 </body>
48 </html>