运行 ❯
获取您的
自有
网站
×
更改方向
保存代码
更改主题,暗/亮
前往 Spaces
<!DOCTYPE html> <html> <head> <style> body { background-color:#E7E9EB; } #myDIV { height:300px; background-color:#FFFFFF; } .bluediv { width:200px; background-color:rgba(182, 215, 229, 0.6); border: solid black 1px; margin-block: 10px; } .reddiv { width:200px; background-color:rgba(239, 135, 88, 0.6); text-align: center; } </style> </head> <body> <h1>The margin-block property</h1> <div id="myDIV"> <p>Red div elements are shown to highlight margin at the start and end of the blue div element in the block direction.</p> <div class="reddiv">div</div> <div class="bluediv"> See this blue div element with different margin-block values. </div> <div class="reddiv">div</div> </div> </body> </html>