运行 ❯
获取您
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> * { box-sizing: border-box; } /* Create three unequal columns that floats next to each other */ .column { float: left; padding: 10px; height: 300px; /* Should be removed. Only for demonstration */ } .left, .right { width: 25%; } .middle { width: 50%; } /* Clear floats after the columns */ .row:after { content: ""; display: table; clear: both; } </style> </head> <body> <h2>Three Unequal Columns</h2> <div class="row"> <div class="column left" style="background-color:#aaa;"> <h2>Column 1</h2> <p>Some text..</p> </div> <div class="column middle" style="background-color:#bbb;"> <h2>Column 2</h2> <p>Some text..</p> </div> <div class="column right" style="background-color:#ccc;"> <h2>Column 3</h2> <p>Some text..</p> </div> </div> </body> </html>