实例
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- 上述3个meta标签*必须*放在最前面,任何其他内容都*必须*跟随其后! --> <title>Bootstrap首页布局</title> <!-- Bootstrap --> <link href="..//css/bootstrap.min.css" rel="stylesheet"> <style type="text/css"> .navbar { margin-bottom: 0; } .jumbotron { background-color: #6f5499; } .b-logo { font-size: 108px; color: #fff; margin: 0 auto; width: 144px; height: 144px; border-radius: 15%; border: 1px solid #cdbfe3; display: block; text-align: center; } .b-text { color: #fff; font-size: 30px; text-align: center; } .b-btu { color: #fff; border: 1px solid #cdbfe3; background-color: transparent; text-align: center; padding: 15px 30px; } .b-btu:hover { background-color: #cdbfe3; } .version { text-align: center; font-size: 16px; color: #bdb0d4; } </style> </head> <body> <nav class="navbar"> <div class="container"> <!-- 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="#">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="#">起步</a></li> <li><a href="#">全局CSS样式</a></li> <li><a href="#">组件</a></li> <li><a href="#">JavaScript插件</a></li> <li><a href="#">定制</a></li> <li><a href="#">网站实例</a></li> </ul> <ul class="nav navbar-nav navbar-right"> <li><a href="#">Bootstrap中文网</a></li> </ul> </div><!-- /.navbar-collapse --> </div><!-- /.container-fluid --> </nav> <div class="jumbotron"> <div class="container"> <span class="b-logo">B</span> <p class="b-text">Bootstrap 是最受欢迎的 HTML、CSS 和 JS 框架,用于开发响应式布局、移动设备优先的 WEB 项目。</p> <p class="b-text"> <a class="btn btn-lg b-btu" href="#" role="button">下载 Bootstrap</a> </p> <p class="version">当前版本: v3.3.7 | 文档更新于:2018-10-01</p> </div> </div> <script src="../js/jquery.min.js"></script> <script src="../js/bootstrap.min.js"></script> </body> </html>
运行实例 »
点击 "运行实例" 按钮查看在线实例