Run ❯
Get your
own
website
❯
Run Code
Ctrl+Alt+R
Save Code
Ctrl+Alt+A
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
Go to Spaces
Ctrl+Alt+P
<!DOCTYPE html> <html> <head> <style> #div1, #div2{ width: 40%; border: solid black 3px; float: left; margin: 2px; } #div1{ max-block-size: 100px; } #div2{ block-size: 100px; } p.content{ margin: 0; background-color: lightgreen; height: 50px; animation: mymove 5s infinite; } @keyframes mymove { 50% {height: 150px;} } </style> </head> <body> <h1>Max-block-size and block-size comparison</h1> <p>Content gradually changes size in the same way inside both boxes, but the effects from max-block-size and block-size are different. The box with max-block-size is able to shrink along with its shrinking content:<p> <div id="div1"> <p class="content">Div element with max-block-size 100px;</p> </div> <div id="div2"> <p class="content">Div element with block-size 100px;</p> </div> </body> </html>