shape-outside-border-box-border-radius-003.html (1700B)
1 <!DOCTYPE html> 2 <!-- Any copyright is dedicated to the Public Domain. 3 - http://creativecommons.org/publicdomain/zero/1.0/ --> 4 5 <html> 6 <meta charset="utf-8"> 7 <title>CSS Shape Test: float right, border-box, border-radius</title> 8 <link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com"> 9 <link rel="author" title="Mozilla" href="http://www.mozilla.org/"> 10 <link rel="help" href="https://drafts.csswg.org/css-shapes-1/#shapes-from-box-values"> 11 <link rel="match" href="reference/shape-outside-border-box-border-radius-003-ref.html"> 12 <meta name="assert" content="Test the boxes are wrapping around the right float shape defined by the border-box and border-radius value."> 13 <style> 14 .container { 15 direction: rtl; 16 width: 200px; 17 line-height: 0; 18 } 19 20 .shape { 21 float: right; 22 shape-outside: border-box; 23 border-radius: 50%; 24 box-sizing: content-box; 25 height: 40px; 26 width: 40px; 27 padding: 20px; 28 border: 20px solid lightgreen; 29 margin: 20px; 30 background-color: orange; 31 } 32 33 .box { 34 display: inline-block; 35 width: 60px; 36 background-color: blue; 37 } 38 39 .longbox { 40 display: inline-block; 41 width: 200px; 42 height: 20px; 43 background-color: blue; 44 } 45 </style> 46 47 <main class="container"> 48 <div class="shape"></div> 49 <div class="longbox"></div> <!-- Saturate the margin space --> 50 <div class="box" style="height: 24px;"></div> <!-- Box at corner --> 51 <div class="box" style="height: 36px;"></div> 52 <div class="box" style="height: 36px;"></div> 53 <div class="box" style="height: 24px;"></div> <!-- Box at corner --> 54 <div class="longbox"></div> <!-- Saturate the margin space --> 55 </main> 56 </html>