_div中分成3分">
当前位置:   article > 正文

CSS div 三等分_div中分成3分

div中分成3分
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>div 三等分</title>
    <meta name="Keywords" content="关键字">
    <meta name="description" content="简介">
    <style>
        body {
            margin: 0;
            padding: 0;
        }

        .item {
            box-sizing: border-box;
            width: calc(33.333% - 5px);
            height: 150px;
            float: left;
            margin-right: 5px;
            /*border: 1px solid orange;*/
        }

        .item:last-child {
            margin-right: 0;
            float: right;
        }

        .aqua {
            background-color: aqua;
        }

        .green {
            background-color: green;
        }

        .palevioletred {
            background-color: palevioletred;
        }
    </style>
</head>
<body>
<div class="box1">
    <div class="box2">
        <div class="item aqua">1</div>
        <div class="item green">2</div>
        <div class="item palevioletred">3</div>
    </div>
</div>
</body>
</html>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop】
推荐阅读
相关标签
  

闽ICP备14008679号