问答详情
源自:3-1 静态页面实现

摸索着写的,跟老师的有点不一样,自己写的可能有点乱,不过显示效果是一样的

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <style type="text/css">
        .sprite {
            width: 100px;
            border: 1px solid #bbbbbb;
            background: silver;
        }

        ul {
            list-style: none;
            margin: 0;
        }

        li h3 {
            font-size: 14px;
            font-weight: 400;
            margin: 0;
        }

        li {
            border-bottom: 1px solid darkgray;
            margin-top: 10px;
            height: 30px;
            line-height: 30px;

        }
    </style>
</head>
<body>

<div class="sprite">
    <ul>
        <li>
            <i></i>

            <h3>aaa</h3>
        </li>
    </ul>
    <ul>
        <li>
            <i></i>

            <h3>aab</h3>
        </li>
    </ul>
    <ul>
        <li>
            <i></i>

            <h3>aac</h3>
        </li>
    </ul>
    <ul>
        <li>
            <i></i>

            <h3>aad</h3>
        </li>
    </ul>
    <ul>
        <li>
            <i></i>

            <h3>aae</h3>
        </li>
    </ul>
    <ul>
        <li>
            <i></i>

            <h3>aaf</h3>
        </li>
    </ul>
</div>

</body>
</html>

http://img.mukewang.com/557d7cc80001cd0e02870338.jpg

提问者:不等号 2015-06-14 21:08

个回答

  • Ab_Tang
    2015-06-28 09:07:23

    margin本身可以写成一次 比如*{margin:0}你每个都写一遍太犯错了  li的margin-top:10px真心不是特别理解 为什么要写它