shape-outside-padding-box-border-radius-002-ref.html (1599B)
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, padding-box, border-radius reference</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 <style> 11 .container { 12 direction: rtl; 13 position: absolute; 14 width: 200px; 15 line-height: 0; 16 } 17 18 .shape { 19 float: right; 20 /* Omit shape-outside: border-box; */ 21 border-radius: 50%; 22 box-sizing: content-box; 23 height: 40px; 24 width: 40px; 25 padding: 40px; 26 border: 10px solid lightgreen; 27 margin: 10px; 28 background-color: orange; 29 } 30 31 .box { 32 position: absolute; 33 width: 60px; 34 background-color: blue; 35 } 36 37 .longbox { 38 position: absolute; 39 width: 200px; 40 height: 20px; 41 background-color: blue; 42 } 43 </style> 44 45 <main class="container"> 46 <div class="shape"></div> 47 <div class="longbox" style="top: 0; right: 0;"></div> <!-- Saturate the margin and border space --> 48 <div class="box" style="height: 24px; top: 20px; right: 128px;"></div> <!-- Box at corner --> 49 <div class="box" style="height: 36px; top: 44px; right: 140px;"></div> 50 <div class="box" style="height: 36px; top: 80px; right: 140px;"></div> 51 <div class="box" style="height: 24px; top: 116px; right: 128px;"></div> <!-- Box at corner --> 52 <div class="longbox" style="top: 140px; right: 0;"></div> <!-- Saturate the margin and border space --> 53 </main> 54 </html>