Home > Web Front-end > JS Tutorial > body text

Chapter 3: Bootstrap table and button functions_javascript skills

WBOY
Release: 2016-05-16 15:03:58
Original
1581 people have browsed it

Bootstrap, from Twitter, is currently the most popular front-end framework. Bootstrap is based on HTML, CSS, and JAVASCRIPT. It is simple and flexible, making web development faster.

Learning points:

1. Form

2. Button

In this lesson, we will mainly learn about Bootstrap table and button functions, and display various rich effects through built-in CSS definitions.

1. Form

Bootstrap provides some rich table styles for developers to use.

1. Basic format

//实现基本的表格样式
<table class="table"> 
Copy after login

Note: We can view the corresponding CSS through Firebug.

2. Striped table

//让<tbody>里的行产生一行隔一行加单色背景效果
<table class="table table-striped"> 
Copy after login

Note: The table effect needs to be based on the basic format.table

3. Table with borders

//给表格增加边框
<table class="table table-bordered"> 
Copy after login

4. Hover the mouse

//让<tbody>下的表格悬停鼠标实现背景效果
<table class="table table-hover"> 
Copy after login

5. Status class

//可以单独设置每一行的背景样式
<tr class="success"> 
Copy after login

Note: A total of five different styles are available.

Style description:

Active mouseover on row or cell
Success identifies success or positive action
info identifies common prompt information or actions
The warning sign warns or requires user attention
Danger means dangerous or potentially negative actions

6. Hide a certain row

//隐藏行
<tr class="sr-only"> 
Copy after login

7. Responsive form

//表格父元素设置响应式,小于 768px 出现边框
<body class="table-responsive"> 
Copy after login

2. Button

Bootstrap provides many rich buttons for developers to use.

1. Labels or elements that can be used as buttons

//转化成普通按钮
<a href="###" class="btn btn-default">Link</a>
<button class="btn btn-default">Button</button>
<input type="button" class="btn btn-default" value="input"> 
Copy after login

There are three things to note:

(1). Precautions for components

Although button classes can be applied to and

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