1. 程式人生 > >左固定右邊自適應

左固定右邊自適應

eight ack wid spa mar 固定 pan gin float

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <style type="text/css">
            .left{
                height: 300px;
                width: 200px;
                background: red;
                float: left;
                /*
opacity: 0.5;*/ } .right{ height: 300px; background: blue; margin-left: 200px; /*width: 100%;*/ } .main{ width: 80%; margin: auto; } </style> </
head> <body> <div class="main"> <div class="left"></div> <div class="right"></div> </div> </body> </html>

左固定右邊自適應