博客列表 >Bootstrap导航巨幕缩略图等组件 —2018年9月27日23时45分

Bootstrap导航巨幕缩略图等组件 —2018年9月27日23时45分

感恩的心的博客
感恩的心的博客原创
2018年10月08日 16:54:02724浏览

1、编程: 仿bootcss.com , bootstrap中文网首页,使用navbar导航条, 巨幕,缩略图等组件完成

实例

<!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="http://cdn.bootcss.com/bootstrap/3.2.0/css/bootstrap.css">
        <script src="http://libs.baidu.com/jquery/2.0.0/jquery.js"></script>
        <script src="http://apps.bdimg.com/libs/bootstrap/3.2.0/js/bootstrap.js"></script>
        <style>
            .imgSize{
                width: 100px;
                height: 200px;
            }
        </style>
        <title>Document</title>
    </head>
    <body>
        <div class="container">
            <div class="col-md-12" >
                <nav class="navbar navbar-default"  style="margin-bottom: 0">
                    <div class="container-fluid">
                        <!-- Brand and toggle get grouped for better mobile display -->
                        <div class="navbar-header">
                            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                                <span class="sr-only">Toggle navigation</span>
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                            </button>
                            <a class="navbar-brand" href="#">浩然之气</a>
                        </div>

                        <!-- Collect the nav links, forms, and other content for toggling -->
                        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                            <ul class="nav navbar-nav">
                                <li class="active"><a href="#">链接<span class="sr-only">(current)</span></a></li>
                                <li><a href="#">链接</a></li>
                                <li class="dropdown">
                                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">分类 <span class="caret"></span></a>
                                    <ul class="dropdown-menu">
                                        <li><a href="#">儒家</a></li>
                                        <li><a href="#">佛学</a></li>
                                        <li><a href="#">道家</a></li>
                                        <li role="separator" class="divider"></li>
                                        <li><a href="#">圣贤教育</a></li>
                                        <li role="separator" class="divider"></li>
                                        <li><a href="#">更多</a></li>
                                    </ul>
                                </li>
                            </ul>
                            <form class="navbar-form navbar-left">
                                <div class="form-group">
                                    <input type="text" class="form-control" placeholder="搜索">
                                </div>
                                <button type="submit" class="btn btn-default">提交</button>
                            </form>
                            <ul class="nav navbar-nav navbar-right">
                                <li><a href="#">链接</a></li>
                                <li class="dropdown">
                                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">分类 <span class="caret"></span></a>
                                    <ul class="dropdown-menu">
                                        <li><a href="#">儒家</a></li>
                                        <li><a href="#">佛学</a></li>
                                        <li><a href="#">道家</a></li>
                                        <li role="separator" class="divider"></li>
                                        <li><a href="#">圣贤教育</a></li>
                                    </ul>
                                </li>
                            </ul>
                        </div><!-- /.navbar-collapse -->
                    </div><!-- /.container-fluid -->
                </nav>
                <div class="jumbotron">
                    <h1>感恩的心</h1>
                    <p>...</p>
                    <p><a class="btn btn-primary btn-lg" href="#" role="button">了解更多</a></p>
                </div>
                
                <div class="row">
                    <div class="col-sm-6 col-md-4">
                        <div class="thumbnail">
                            <img src="img/fuzi.jpg" alt="..." class='imgSize'>
                            <div class="caption">
                                <h3>儒家</h3>
                                <p>...</p>
                                <p><a href="#" class="btn btn-primary" role="button">学习</a> <a href="#" class="btn btn-default" role="button">深入了解</a></p>
                            </div>
                        </div>
                    </div>
                    
                    <div class="col-sm-6 col-md-4">
                        <div class="thumbnail">
                            <img src="img/daojun.jpg" alt="..." class='imgSize'>
                            <div class="caption">
                                <h3>道家</h3>
                                <p>...</p>
                                <p><a href="#" class="btn btn-primary" role="button">学习</a> <a href="#" class="btn btn-default" role="button">深入了解</a></p>
                            </div>
                        </div>
                    </div>
                    
                    <div class="col-sm-6 col-md-4">
                        <div class="thumbnail">
                            <img src="img/fo.jpg" alt="..." class='imgSize'>
                            <div class="caption">
                                <h3>佛学</h3>
                                <p>...</p>
                                <p><a href="#" class="btn btn-primary" role="button">学习</a> <a href="#" class="btn btn-default" role="button">深入了解</a></p>
                            </div>
                        </div>
                    </div>
                </div>

            </div>

        </div>
        

    </body>
</html>

运行实例 »

点击 "运行实例" 按钮查看在线实例

 

声明:本文内容转载自脚本之家,由网友自发贡献,版权归原作者所有,如您发现涉嫌抄袭侵权,请联系admin@php.cn 核实处理。
全部评论
文明上网理性发言,请遵守新闻评论服务协议