Home > Web Front-end > JS Tutorial > Bootstarp layout component application example explanation_javascript skills

Bootstarp layout component application example explanation_javascript skills

WBOY
Release: 2016-05-16 15:15:18
Original
997 people have browsed it

The example in this article introduces the application practice of Bootstarp layout component and shares it with everyone for your reference. The specific content is as follows

Application examples of font icons

<button type="button" class="btn btn-default">
 <span class="glyphicon glyphicon-sort-by-attributes"></span>
</button>
Copy after login

Dropdown menu example

<div class="dropdown">
 <button type="button" class="btn dropdown-toggle" id="dropdownMenu1" 
  data-toggle="dropdown">
  主题
  <span class="caret"></span>
 </button>
 <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
  <li role="presentation" class="dropdown-header">下拉菜单标题</li>
  <li role="presentation">
   <a role="menuitem" tabindex="-1" href="#">选项1</a>
  </li>
  <li role="presentation">
   <a role="menuitem" tabindex="-1" href="#">选项2</a>
  </li>
  <li role="presentation"> 
   <a role="menuitem" tabindex="-1" href="#">选项3</a>
  </li>
  <li role="presentation" class="divider"></li><!--分割线-->
  <li role="presentation">
   <a role="menuitem" tabindex="-1" href="#">分离的链接</a>
  </li>
 </ul>
</div>
Copy after login

Button toolbar and button group

<div class="btn-toolbar" role="toolbar"><!--用来嵌套btn-group-->
 <div class="btn-group btn-group-lg">
 <!--btn-group-lg用来控制按钮组的大小,bt-group-vertical是垂直的按钮组,bt-group也可以嵌套bt-group-->
  <button type="button" class="btn btn-default">Button 1</button>
  <button type="button" class="btn btn-default">Button 2</button>
  <button type="button" class="btn btn-default">Button 3</button>
  </div>
  <div class="btn-group btn-group-sm">
  <button type="button" class="btn btn-default">Button 4</button>
  <button type="button" class="btn btn-default">Button 5</button>
  <button type="button" class="btn btn-default">Button 6</button>
 </div>
  <div class="btn-group btn-group-xs">
  <button type="button" class="btn btn-default">Button 7</button>
  <button type="button" class="btn btn-default">Button 8</button>
  <button type="button" class="btn btn-default">Button 9</button>
 </div>
</div>
Copy after login

Button drop-down menu

 <div class="btn-group"><!--加类.dropup可以变成按钮上拉菜单-->
  <button type="button" class="btn btn-default dropdown-toggle" 
   data-toggle="dropdown"> <!-- 加类.btn-xs之类的东西改变按钮大小-->
   默认 <span class="caret"></span>
  </button>
  <ul class="dropdown-menu" role="menu">
   <li><a href="#">功能</a></li>
   <li><a href="#">另一个功能</a></li>
   <li><a href="#">其他</a></li>
   <li class="divider"></li><!--分割线-->
   <li><a href="#">分离的链接</a></li>
  </ul>
 </div>
Copy after login

Input box group in form

<form class="bs-example bs-example-form" role="form">
  <div class="input-group input-group-lg"><!--input-group-lg调整输入框组大小-->
   <input type="text" class="form-control">
   <span class="input-group-addon">.00</span>
  </div>
  <br>
  <div class="input-group">
   <span class="input-group-addon">
   <input type="checkbox"><!--复选框和单选框都能应用于输入框组-->
   </span>
   <input type="text" class="form-control">
  </div>
  <br>
  <div class="input-group">
   <input type="text" class="form-control">
   <span class="input-group-btn"><!--按钮也能应用于输入框组请注意这里的类变为了input-group-btn,甚至可以加上前面的按钮下拉菜单-->
    <button class="btn btn-default" type="button">
     Go!
    </button>
   </span>
  </div>
 </form>
Copy after login

The above is part of the content about the application of Bootstarp layout components. I hope it will be helpful to everyone's learning, and continue to pay attention.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template