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