CSS3-综合案例-新闻

代码:

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

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 清除标签默认内外边距 */
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        .new {
            width: 500px;
            height: 400px;
            border-right: 1px solid #cccccc;
            border-bottom: 1px solid #cccccc;
            padding: 41px 30px 0;
        }
        
        .new h2 {
            border-bottom: 1px solid #cccccc;
            line-height: 41px;
            padding-bottom: 9px;
            font-size: 30px;
        }
        
        .new ul {
            list-style: none;
        }
        
        .new ul li {
            height: 50px;
            border-bottom: 1px dashed #cccccc;
            padding-left: 30px;
            line-height: 50px;
        }
        
        .new li a {
            color: #666;
            font-size: 18px;
            text-decoration: none;
        }
    </style>
</head>

<body>
    <div class="new">
        <h2>最新文章/New Articles</h2>
        <ul>
            <li><a href="#">北京招聘网页设计,平面设计,php</a></li>
            <li><a href="#">体验javascript的魅力</a></li>
            <li><a href="#">jquery世界来临</a></li>
            <li><a href="#">网页设计师的梦想</a></li>
            <li><a href="#">jquery中的链式编程是什么</a></li>
        </ul>
    </div>
</body>

</html>

效果图;