CSSのoverfloatの小さい技巧

4350 ワード


<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Documenttitle>
    <style>
        /*                       margin-right:0   ;*/
        /*1                  
              2                                margin-right   
             3       overflow:hidden
             */
        *{
            margin:0;
            padding:0;
        }
        .out_wrap{
            width:900px;
            height:500px;
            background:black;
            overflow: hidden;
            margin:0 auto;
        }
        .lists{
            width:990px;
        }
        .item{
            width:280px;
            height:100px;
            float:left;
            margin-right:50px;
            background:red;
        }
    style>
head>
<body>
    <div class="out_wrap">
        <ul class="lists">
            <li class="item">li>
            <li class="item">li>
            <li class="item">li>
        ul>
    div>
body>
html>