bootstrap简单使用布局、栅格系统、modal标签页等常用组件入门

DOCTYPE html>
<html>
<head>
    <title>bootstraptitle>
    
    <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css">
    
    <link rel="stylesheet" type="text/css" href="animate.css">
head>
<body>







<div class="container">
    <div class="row">
      <div class="col-md-8"><p style="background: gray">.col-md-8p>div>
      <div class="col-md-4"><p style="background: gray">.col-md-4p>div>
    div>

    <div class="row">
      <div class="col-md-4"><p style="background: gray">.col-md-4p>div>
      <div class="col-md-8"><p style="background: gray">.col-md-8p>div>
    div>

    <div class="row">
        <div class="col-md-4"><p style="background: pink">pink1p>div>
        <div class="col-md-4"><p style="background: pink">pink2p>div>
        <div class="col-md-4"><p style="background: pink">pink3p>div>
    div>


<table class="table table-striped table-bordered">
        <thead>
            <tr>
                <th>用户名th>
                <th>密码th>
            tr>
        thead>
        
        <tbody>
            <tr>
                <td>usernametd>
                <td>passwordtd>
            tr>

            <tr class='success'>
                <td>usernametd>
                <td>passwordtd>
            tr>

            <tr class='info'>
                <td>usernametd>
                <td>passwordtd>
            tr>

            <tr class='warning'>
                <td>usernametd>
                <td>passwordtd>
            tr>
        tbody>
table>




<p class="text-muted">字体颜色字体颜色字体颜色字体颜色字体颜色字体颜色p>
<p class="text-primary">字体颜色字体颜色字体颜色字体颜色字体颜色字体颜色p>
<p class="text-success">字体颜色字体颜色字体颜色字体颜色字体颜色字体颜色p>
<p class="text-info">字体颜色字体颜色字体颜色字体颜色字体颜色字体颜色p>
<p class="text-warning">字体颜色字体颜色字体颜色字体颜色字体颜色字体颜色p>
<p class="text-danger">字体颜色字体颜色字体颜色字体颜色字体颜色字体颜色p>




<a href="http://www.baidu.com" target="_blank" class="btn btn-success">successa>



<p class="bg-primary">背景色背景色背景色背景色背景色背景色背景色背景色背景色p>
<p class="bg-success">背景色背景色背景色背景色背景色背景色背景色背景色背景色p>
<p class="bg-info">背景色背景色背景色背景色背景色背景色背景色背景色背景色p>
<p class="bg-warning">背景色背景色背景色背景色背景色背景色背景色背景色背景色p>
<p class="bg-danger">背景色背景色背景色背景色背景色背景色背景色背景色背景色p>





<p class="glyphicon glyphicon-apple" style="color: green">p>





<div class="progress">
  <div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 45%">
    <span class="sr-only">45% Completespan>
  div>
div>

<h2>第三方css动画效果库Animate.cssh2>

<button class="btn btn-success animated flash">buttonbutton>

div>
body>
html>

 bootstrap结合javascript展示标签页和弹出框的示例:

DOCTYPE html>
<html>
<head>
  <title>javascripttitle>
  <meta charset="utf-8">
  
  <script type="text/javascript" src="static/jquery-3.3.1.min.js">script>
  <script src="static/bootstrap.min.js">script>
  <link rel="stylesheet" type="text/css" href="static/bootstrap.min.css">
head>
<body>
<div class="container">
  <div id="jinfo" class="alert alert-success">jquerydiv>
  <div id="btn1" class="btn btn-info">按钮div>

  
  <div>
    
    <ul class="nav nav-tabs" role="tablist">
      <li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">Homea>li>
      <li role="presentation"><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">Profilea>li>
      <li role="presentation"><a href="#messages" aria-controls="messages" role="tab" data-toggle="tab">Messagesa>li>
      <li role="presentation"><a href="#settings" aria-controls="settings" role="tab" data-toggle="tab">Settingsa>li>
    ul>

  <div class="tab-content">
    <div role="tabpanel" class="tab-pane active" id="home">company home pagediv>
    <div role="tabpanel" class="tab-pane" id="profile">profile pagediv>
    <div role="tabpanel" class="tab-pane" id="messages">3div>
    <div role="tabpanel" class="tab-pane" id="settings">4div>
  div>
  div>


  
  
  

  
  <div class="modal fade" id="chinasoft" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×span>button>
          <h4 class="modal-title" id="myModalLabel">Modal titleh4>
        div>
        <div class="modal-body">
          弹出框model文字内容
        div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">Closebutton>
          <button type="button" class="btn btn-primary">Save changesbutton>
        div>
      div>
    div>
  div>

  <button class="btn btn-success" id="showmodal">弹出modalbutton>

div>

<script type="text/javascript">
  $('#btn1').on('click', function(){
    $('#jinfo').hide(1000).show(1000);
  })

  //展示modal弹出框
  $('#showmodal').on('click', function(){
    $('#chinasoft').modal('show');
  })
  
script>
body>
html>

bootstrap简单使用布局、栅格系统、modal标签页等常用组件入门_第1张图片

你可能感兴趣的:(bootstrap简单使用布局、栅格系统、modal标签页等常用组件入门)