前端笔记之bootstrap今日头条用例

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
    <script src="js/jquery.min.js"></script>
    <script src="bootstrap/js/bootstrap.min.js"></script>
    <title>今日头条</title>
    <style>
        .type-list {
            color: black;
        }
        .type-list .active, .type-list .active:hover {
            color: white;
            background-color: brown;
        }
        .type-list .list-group-item and not .active:hover {
            cursor: pointer;
            background-color: #F5F5F5;
        }
        .news-list img {
            width: 100%;
            margin: -10px 0 10px;
            border-radius: 3px;
        }
        .news-list p {
            margin: 10px 0;
        }
        .news-list > .list-group-item, .type-list > .list-group-item {
            border: none;
        }


        .navbar {
            margin-bottom: 0;
        }
        .navbar-collapse {
            padding-right: 0;
        }
        .list-group-item a:hover {
            text-decoration: none;
        }
    </style>
</head>
<body>
    <div class="navbar navbar-inverse">
        <div class="container">
            <div class="navbar-header">
                <a href="#" class="navbar-brand">今日头条</a>
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#link-nav">
                    <span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span>
                </button>
            </div>
            <div class="collapse navbar-collapse" id="link-nav">
                <ul class="nav navbar-nav">
                    <li class="active"><a href="#">首页</a></li>
                    <li><a href="#">国际</a></li>
                    <li><a href="#">国内</a></li>
                    <li><a href="#">社会</a></li>
                    <li><a href="#">军事</a></li>
                    <li><a href="#">科技</a></li>
                </ul>
                <form action="#" class="navbar-form navbar-right">
                    <div class="input-group">
                        <input type="text" class="form-control" placeholder="关键字">
                        <span class="input-group-btn">
                            <button type="submit" class="btn">搜索</button>
                        </span>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <div class="container">
        <div class="row">
            <div class="col-md-2">
                <div class="list-group type-list">
                    <a class="list-group-item active" href="#">综合</a></a>
                    <a class="list-group-item" href="#">明星</a>
                    <a class="list-group-item" href="#">电影</a>
                    <a class="list-group-item" href="#">动漫</a>
                    <a class="list-group-item" href="#">娱乐</a>
                    <a class="list-group-item" href="#">八卦</a>
                </div>
            </div>
            <div class="col-md-7">
                <div class="list-group news-list">
                    <div class="list-group-item">
                        <div class="row">
                            <div class="col-md-4">
                                <img src="img/news.jpg" alt="">
                            </div>
                            <div class="col-md-8">
                                <a href="#" class="h4"><strong>我国诞生人口总比占世界人口出生人口的xx.x%,如此庞大的的比重,我国又该如何处理...</strong></a>
                                <p>新华社·2.3万评论·1分钟前</p>
                            </div>
                        </div>
                    </div>
                    <div class="list-group-item">
                        <div class="row">
                            <div class="col-md-4">
                                <img src="img/news.jpg" alt="">
                            </div>
                            <div class="col-md-8">
                                <a href="#" class="h4"><strong>我国诞生人口</strong></a>
                                <p>新华社·2.3万评论·1分钟前</p>
                            </div>
                        </div>
                    </div>
                    <div class="list-group-item">
                        <div class="row">
                            <div class="col-md-4">
                                <img src="img/news.jpg" alt="">
                            </div>
                            <div class="col-md-8">
                                <a href="#" class="h4"><strong>我国诞生人口</strong></a>
                                <p>新华社·2.3万评论·1分钟前</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-md-3">
                <div class="list-group news-list">
                    <h3 class="list-group-item-heading text-center">24小时新闻</h3>
                    <div class="list-group-item">
                        <div class="row">
                            <div class="col-md-4">
                                <img src="img/news.jpg" alt="">
                            </div>
                            <div class="col-md-8">
                                <a href="#">我国诞生人口我国诞生人口我国诞生人口</a>
                            </div>
                        </div>
                    </div>
                    <div class="list-group-item">
                        <div class="row">
                            <div class="col-md-4">
                                <img src="img/news.jpg" alt="">
                            </div>
                            <div class="col-md-8">
                                <a href="#">我国诞生人口我国诞生人口我国诞生人口</a>
                            </div>
                        </div>
                    </div>
                    <div class="list-group-item">
                        <div class="row">
                            <div class="col-md-4">
                                <img src="img/news.jpg" alt="">
                            </div>
                            <div class="col-md-8">
                                <a href="#">我国诞生人口我国诞生人口</a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>

今日头条样例

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值