border-radius-overflow-hidden.html (979B)
1 <!DOCTYPE html> 2 <html> 3 <!-- Submitted from TestTWF Paris --> 4 5 <head> 6 7 <title>CSS Backgrounds and Borders Test: Clipping to the border-radius curve</title> 8 <link rel="author" title="Lea Verou" href="http://lea.verou.me" /> 9 <link rel="help" href="http://www.w3.org/TR/css3-background/#corner-clipping" /> 10 <meta name="assert" content="Effects that clip to the border or padding edge (such as 'overflow' other than 'visible') must clip to the curve" /> 11 <style> 12 div { 13 position: absolute; 14 } 15 16 .ref, 17 .test { 18 border-radius: 30px; 19 } 20 21 .ref { 22 width: 104px; 23 height: 104px; 24 left: -2px; 25 top: -2px; 26 background-color: green; 27 } 28 29 .test, 30 .contents { 31 background-color: red; 32 width: 100px; 33 height: 100px; 34 } 35 36 .test { 37 overflow: hidden; 38 } 39 40 </style> 41 42 </head> 43 <body> 44 45 <p>Test passes if there is one filled green rounded square and <strong>no red</strong>.</p> 46 <div class="container"> 47 <div class="test"> 48 <div class="contents"></div> 49 </div> 50 <div class="ref"></div> 51 </div> 52 53 </body> 54 </html>