TAG
CSS
Result
Run
License
<h3>contain: paint</h3> <div> <p>Don’t kill the goose that lays the golden eggs.</p> </div> <h3>contain: visible</h3> <div> <p>Don’t kill the goose that lays the golden eggs.</p> </div>
div { width: 100px; height: 100px; background: red; margin: 10px; font-size: 20px; position: relative; } div:first-of-type { contain: paint; } div > p { position: absolute; top: -40px; }
Console
expand_less
License
License
by DevDic
Close