Bootstrap(一)

Bootstrap 是最受欢迎的 HTML、CSS 和 JS 框架,用于开发响应式布局、移动设备优先的 WEB 项目。

使用感觉简约大气便捷,扁平化设计。好多好多CSS、JS....总有你心仪的那一款!喜欢就上官网找,那里更丰富呦!

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">
    
    <title>Bootstrap 101 Templatetitle>

    
    <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.4/css/bootstrap.min.css">
    
  head>
  <body>
      <h3>导航栏h3>
    <nav class="navbar navbar-inverse navbar-fixed-top">
        <div id="navbar" class="navbar-collapse collapse">
          <ul class="nav navbar-nav">
            <li class="active"><a href="#">Homea>li>
            <li><a href="#about">Abouta>li>
            <li><a href="#contact">Contacta>li>
            <li class="dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Dropdown <span class="caret">span>a>
              <ul class="dropdown-menu" role="menu">
                <li><a href="#">Actiona>li>
                <li><a href="#">Another actiona>li>
                <li class="divider">li>
                <li class="dropdown-header">Nav headerli>
                <li><a href="#">Separated linka>li>
              ul>
            li>
          ul>
        div>
      div>
    nav>
    <h1>你好,bootstrap!h1>
     <h3>图标h3>   
    <span class="glyphicon glyphicon-home">span><br>
    <span class="glyphicon glyphicon-signal">span>
    <span class="glyphicon glyphicon-cog">span>
    <span class="glyphicon glyphicon-apple">span>
    <span class="glyphicon glyphicon-trash">span>
    <span class="glyphicon glyphicon-play-circle">span>
    <span class="glyphicon glyphicon-headphones">span>
    <span class="glyphicon glyphicon-send">span>
    <h3>按钮h3>
    <button type="button" class="btn btn-default">按钮button>
    <button type="button" class="btn btn-primary">primarybutton>
    <button type="button" class="btn btn-success">successbutton>
    <button type="button" class="btn btn-info">infobutton>
    <button type="button" class="btn btn-warning">warningbutton>
    <button type="button" class="btn btn-danger">dangerbutton>
    
    <h3>按钮尺寸h3>
    <button type="button" class="btn btn-default">按钮button>
    <button type="button" class="btn btn-primary btn-lg">primarybutton>
    <button type="button" class="btn btn-success btn-sm">successbutton>
    <button type="button" class="btn btn-info btn-xs">infobutton>

    <h3>把图标显示在按钮里h3>
    <button type="button" class="btn btn-default"><span class="glyphicon glyphicon-home">span>  按钮button>
    



    <h3>下拉菜单h3>
    <div class="dropdown">
      <button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-expanded="true">
        Dropdown
        <span class="caret">span>
      button>
      <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
        <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Actiona>li>
        <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another actiona>li>
        <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else herea>li>
        <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated linka>li>
      ul>
    div>
     <h3>输入框h3>
    <div class="input-group">
      <span class="glyphicon glyphicon-user">span>
      <input type="text" placeholder="username">
    div>

    <div class="input-group">
      <span class="glyphicon glyphicon-lock">span>
      <input type="password" placeholder="password">
    div>

     <h3>表单h3>
    <form>
    <div class="form-group">
      <span class="glyphicon glyphicon-user">span>
      <input type="email" id="exampleInputEmail1" placeholder="Enter email">
    div>
    <div class="form-group">
      <span class="glyphicon glyphicon-lock">span>
      <input type="password" id="exampleInputPassword1" placeholder="Password">
    div>
    <div class="form-group">
      <label for="exampleInputFile">File inputlabel>
      <input type="file" id="exampleInputFile">
      <p class="help-block">Example block-level help text here.p>
    div>
    <div class="checkbox">
      <label>
        <input type="checkbox"> Check me out
      label>
    div>
    <button type="submit" class="btn btn-default">Submitbutton>
  form>

 <h3>警告框h3>
    <div class="alert alert-warning alert-dismissible" role="alert">
       <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×span>button>
       <strong>Warning!strong> Better check yourself, you're not looking too good.
    div>
    <div class="alert alert-success" role="alert">
        <a href="#" class="alert-link">success!a>
    div>
    <div class="alert alert-info" role="alert">
        <a href="#" class="alert-link">info!a>
    div>
    <div class="alert alert-warning" role="alert">
        <a href="#" class="alert-link">warning!a>
    div>
    <div class="alert alert-danger" role="alert">
        <a href="#" class="alert-link">danger!a>
    div>
     <h3>进度条h3>
    <div class="progress">
      <div class="progress-bar" role="progressbar" aria-valuenow="70" aria-valuemin="0" aria-valuemax="100" style="width: 60%;">
        70%
      div>
    div>
    <table class="table table-striped">
          <th>
            <td>NAMEtd>
            <td>AGEtd>
            <td>SEXtd>
            <td>aaatd>
          th>
        <tr>
            <td>XIONGtd>
            <td>23td>
            <td>td>
            <td>183td>
        tr>
        <tr>
            <td>XIONGtd>
            <td>23td>
            <td>td>
            <td>183td>
        tr>
        <tr>
            <td>XIONGtd>
            <td>23td>
            <td>td>
            <td>183td>
        tr>
        <tr>
            <td>XIONGtd>
            <td>23td>
            <td>td>
            <td>183td>
        tr>
        <tr class="active"><td>XIONGtd>
            <td>23td>
            <td>td>
            <td>183td>tr>
        <tr class="success"><td>XIONGtd>
            <td>23td>
            <td>td>
            <td>183td>tr>
        <tr class="warning"><td>XIONGtd>
            <td>23td>
            <td>td>
            <td>183td>tr>
        <tr class="danger"><td>XIONGtd>
            <td>23td>
            <td>td>
            <td>183td>tr>
        <tr class="info"><td>XIONGtd>
            <td>23td>
            <td>td>
            <td>183td>tr>
    table>
    <p>
  <button type="button" class="btn btn-primary btn-lg">(大按钮)Large buttonbutton>
  <button type="button" class="btn btn-default btn-lg">(大按钮)Large buttonbutton>
p>
<p>
  <button type="button" class="btn btn-primary">(默认尺寸)Default buttonbutton>
  <button type="button" class="btn btn-default">(默认尺寸)Default buttonbutton>
p>
<p>
  <button type="button" class="btn btn-primary btn-sm">(小按钮)Small buttonbutton>
  <button type="button" class="btn btn-default btn-sm">(小按钮)Small buttonbutton>
p>
<p>
  <button type="button" class="btn btn-primary btn-xs">(超小尺寸)Extra small buttonbutton>
  <button type="button" class="btn btn-default btn-xs">(超小尺寸)Extra small buttonbutton>
p>
<button type="button" class="btn btn-primary btn-lg active">Primary buttonbutton>
<button type="button" class="btn btn-default btn-lg active">Buttonbutton>
<button type="button" class="btn btn-lg btn-primary" disabled="disabled">Primary buttonbutton>
<button type="button" class="btn btn-default btn-lg" disabled="disabled">Buttonbutton>

<img src="..." alt="..." class="img-rounded"><img src="..." alt="..." class="img-circle"><img src="..." alt="..." class="img-thumbnail">边框
<p class="bg-primary">.dddddddd..p>
<p class="bg-success">ffffffff...p>
<p class="bg-info">...eeeeeeeeeeep>
<p class="bg-warning">..wwwwwwwwww.p>
<p class="bg-danger">...ggggggggggp>
                
<button type="button" class="btn btn-default" aria-label="Left Align">
  <span class="glyphicon glyphicon-align-left" aria-hidden="true">span>
button>

<button type="button" class="btn btn-default btn-lg">
  <span class="glyphicon glyphicon-star" aria-hidden="true">span> Star
button>

<div class="dropup">
  <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
    Dropup
    <span class="caret">span>
  button>
  
    <ul class="dropdown-menu" aria-labelledby="dropdownMenu4">
      <li><a href="#">Regular linka>li>
      <li class="disabled"><a href="#">Disabled linka>li>
      <li><a href="#">Another linka>li>
    ul>

div>
    <script src="http://cdn.bootcss.com/jquery/1.11.2/jquery.min.js">script>
    
    <script src="http://cdn.bootcss.com/bootstrap/3.3.4/js/bootstrap.min.js">script>
  body>
html>

 

 

你可能感兴趣的:(Bootstrap(一))