border-radius-clip-001.html (1881B)
1 <!DOCTYPE html> 2 3 <meta charset="UTF-8"> 4 5 <title>CSS Backgrounds and Borders Test: 'border-radius' and corner-clipping of content</title> 6 7 <link rel="author" title="zhouli" href="mailto:liz@oupeng.com"> 8 <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> 9 <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> 10 <link rel="help" href="http://www.w3.org/TR/css-background-3/#corner-clipping"> 11 <link rel="match" href="reference/border-radius-clipping-ref.html"> 12 13 <meta name="assert" content="Test passes if a box with border-radius that clips its content to a box edge clips to the border-radius curve in the corners."> 14 15 <meta name="fuzzy" content="0-57;0-1552"> 16 17 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 18 <style> 19 body > div { float: left; } 20 .round 21 { 22 border: transparent double 20px; 23 border-radius: 50%; 24 padding: 10px; 25 } 26 #bg, #txt, #img-contain 27 { 28 overflow: hidden; 29 width: 80px; 30 } 31 #bg > div 32 { 33 margin: -10px; 34 background-image: url("support/100x100-green-with-red-corners.png"); 35 height: 100px; 36 width: 100px; 37 } 38 #txt > div 39 { 40 margin: -10px; 41 color: green; 42 font: 50px/1 Ahem; 43 } 44 45 img 46 { 47 display: block; 48 } 49 #img-contain > img 50 { 51 margin: -10px; 52 } 53 #img-self 54 { 55 margin: -10px; 56 } 57 </style> 58 59 <p>Test passes if there are four filled green circles and <strong>no red</strong>. 60 61 <div id="bg" class="round"> 62 <div></div> 63 </div> 64 65 <div id="txt" class="round"> 66 <div>XX<br>XX</div> 67 </div> 68 69 <div id="img-contain" class="round"> 70 <img src="support/swatch-green.png" width=100 height=100> 71 </div> 72 73 <div> 74 <img id="img-self" class="round" src="support/swatch-green.png" width=100> 75 </div>