运行 ❯
获取您的
自有
网站
×
更改方向
保存代码
更改主题,深色/浅色
转到 Spaces
<!DOCTYPE html> <html> <head> <style> #div1, #div2{ width: 40%; border: solid black 3px; float: left; margin: 2px; } #div1{ min-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>Min-block-size and block-size comparison</h1> <p>Content gradually changes size in the same way inside both boxes, but the effects from min-block-size and block-size are different. The box with min-block-size is able to grow in order to fit growing content:<p> <div id="div1"> <p class="content">Div element with min-block-size 100px;</p> </div> <div id="div2"> <p class="content">Div element with block-size 100px;</p> </div> </body> </html>