<!DOCTYPE html> | |
<meta charset="UTF-8"> | |
<title>CSS Backgrounds and Borders Test: 'border-radius' and corner-clipping of content</title> | |
<link rel="author" title="zhouli" href="mailto:liz@oupeng.com"> | |
<link rel="author" title="GĂ©rard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> | |
<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> | |
<link rel="help" href="http://www.w3.org/TR/css-background-3/#corner-clipping"> | |
<link rel="match" href="reference/border-radius-clipping-ref.html"> | |
<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."> | |
<meta name="fuzzy" content="0-1;0-1000"> | |
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> | |
<style> | |
body > div { float: left; } | |
.round | |
{ | |
border: transparent double 20px; | |
border-radius: 50%; | |
padding: 10px; | |
} | |
#bg, #txt, #img-contain | |
{ | |
overflow: hidden; | |
width: 80px; | |
} | |
#bg > div | |
{ | |
margin: -10px; | |
background-image: url("support/100x100-green-with-red-corners.png"); | |
height: 100px; | |
width: 100px; | |
} | |
#txt > div | |
{ | |
margin: -10px; | |
color: green; | |
font: 50px/1 Ahem; | |
} | |
img | |
{ | |
display: block; | |
} | |
#img-contain > img | |
{ | |
margin: -10px; | |
} | |
#img-self | |
{ | |
margin: -10px; | |
} | |
</style> | |
<p>Test passes if there are four filled green circles and <strong>no red</strong>. | |
<div id="bg" class="round"> | |
<div></div> | |
</div> | |
<div id="txt" class="round"> | |
<div>XX<br>XX</div> | |
</div> | |
<div id="img-contain" class="round"> | |
<img src="support/swatch-green.png" width=100 height=100> | |
</div> | |
<div> | |
<img id="img-self" class="round" src="support/swatch-green.png" width=100> | |
</div> |