css 左右兩邊對齊


<!DOCTYPE html>
<html lang="">

<head>
    <meta charset="utf-8">
</head>
<style>
    .column-left {
        background: red;
    }

    .column-right {
        background: pink;
    }

    .column-left,
    .column-right {
        margin-bottom: -9999px;
        padding-bottom: 9999px;
        width: 500px;
        float: left;
    }

    .container {
        margin: auto;
        max-width: 1020px;
        overflow: hidden;
    }
</style>

<body>
    <div class="container">
        <div id="colLeft" class="column-left">
            <h4>正方觀點</h4>
            <p>觀點1</p>
            <p>觀點1</p>
            <p>觀點1</p>
            <p>觀點1</p>
            <p>觀點1</p>
            <p>觀點1</p>
            <p>觀點1</p>
            <p>觀點1</p>
            <p>觀點1</p>
            <p>觀點1</p>
        </div>
        <div id="colRight" class="column-right">
            <h4>反方觀點</h4>
            <p>觀點1</p>
        </div>
    </div>

</body>
<script>

</script>

</html>

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM