编程: 仿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"> <title>作业</title> <link rel="stylesheet" href="../lib/dist/css/bootstrap.css"> <script src="../jquery-3.3.1.js"></script> <script src="../lib/dist/js/bootstrap.js"></script> </head> <body> <nav class="navbar navbar-inverse navbar-fixed-top"> <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="http://www.bootcss.com/">Bootstrap中文网</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><a href="#">Bootstrap2中文文档 <span class="sr-only">(current)</span></a></li> <li><a href="#">Bootstrap3中文文档</a></li> <li><a href="#">Bootstrap4中文文档</a></li> <li><a href="#">Less 教程</a></li> <li><a href="#">jQuery API</a></li> <li><a href="#">网站实例</a></li> </ul> <ul class="nav navbar-nav navbar-right"> <li><a href="#">关于</a></li> </ul> </div><!-- /.navbar-collapse --> </div><!-- /.container-fluid --> </nav> <div class="row"> <div class="col-md-12" style="padding:0"> <div class="jumbotron" style="background-color: #563d7c"> <h1 class="text-center" style="color:white">Bootstrap</h1> <h2 class="text-center" style="color:white">简洁、直观、强悍的前端开发框架,让web开发更迅速、简单。</h2> <button class="btn btn-primary btn-lg center-block" type="button">Bootstrap3中文文档(v3.3.7)</button> <button class="btn btn-link center-block" type="button" style="color:grey">Bootstrap3中文文档(v3.3.7)</button> </div> </div> </div> <div class="text-center"> <a class="glyphicon glyphicon-home" href="http://wenda.bootcss.com/">Bootstrap问答社区</a> <a class="glyphicon glyphicon-heart" href="http://weibo.com/bootcss/">新浪微博:@Bootstrap中文网</a> </div> <hr> <br> <h1 class="text-center">Bootstrap相关优质项目推荐</h1> <h5 class="text-center">这些项目或者是对Bootstrap进行了有益的补充,或者是基于Bootstrap开发的</h5> <hr> <br> <div class="row"> <div class="col-sm-6 col-md-3"> <div class="thumbnail" style="height: 336px;"> <img src="https://assets.bootcss.com/www/assets/img/expo.png?1532594948592" alt="..."> <div class="caption"> <h3 class="text-center"><a href="">优站精选</a></h3> <h4 class="text-center">Bootstrap 网站实例</h4> <p class="text-center">Bootstrap 优站精选频道收集了众多基于 Bootstrap 构建、设计精美的、有创意的网站。</p> </div> </div> </div> <div class="col-sm-6 col-md-3"> <div class="thumbnail" style="height: 336px;"> <img src="https://assets.bootcss.com/www/assets/img/webpack.png?1532594948592" alt="..."> <div class="caption"> <h3 class="text-center"><a href="">Webpack</a></h3> <h4 class="text-center">是前端资源模块化管理和打包工具</h4> <p class="text-center">Webpack 是当下最热门的前端资源模块化管理和打包工具。它可以将许多松散的模块按照依赖和规则打包成符合***环境部署的前端资源。</p> </div> </div> </div> <div class="col-sm-6 col-md-3"> <div class="thumbnail" style="height: 336px;"> <img src="https://assets.bootcss.com/www/assets/img/react.png?1532594948592" alt="..."> <div class="caption"> <h3 class="text-center"><a href="">React</a></h3> <h4 class="text-center">用于构建用户界面的 JavaScript 框架</h4> <p class="text-center">React 起源于 Facebook 的内部项目,是一个用于构建用户界面的 JavaScript 库。</p> </div> </div> </div> <div class="col-sm-6 col-md-3"> <div class="thumbnail" style="height: 336px;"> <img src="https://assets.bootcss.com/www/assets/img/typescript.png?1532594948592" alt="..."> <div class="caption"> <h3 class="text-center"><a href="">TypeScript </a></h3> <h4 class="text-center">中文手册</h4> <p class="text-center">TypeScript 是由微软开源的编程语言。它是 JavaScript 的一个超集,而且本质上向这个语言添加了可选的静态类型和基于类的面向对象编程。</p> </div> </div> </div> </div> </body> </html>
运行实例 »
点击 "运行实例" 按钮查看在线实例