search
Homephp教程PHP开发Summary of Bootstrap's class styles

Summary of Bootstrap's class styles

Dec 03, 2016 am 10:42 AM
bootstrap

Basic class

.code to display a single line of inline code
.pre to display multi-line block code
.kbd to display user input code
.pre-scrollable If the height exceeds 340px, a scroll bar will appear on the Y-axis

Table class

.table basic table margin-bottom: 20px, 2px solid light gray line at the bottom of thead, 1px solid light gray line at the top of each cell
.table-striped: Zebra table, every other row has a light gray background Color
.table-bordered: A table with borders, all cells have a 1px border
.table-hover: Hover the mouse over the rows of the table, with a highlighted background color
.table-condensed: Convert the cells Adjust the padding from 8px to 5px
.table-responsive: Set the container with the class name .table-responsive, and place

in this container

The class of the table row

.active indicates Current activity information
.success success or correct behavior
.info represents neutral information or behavior
.warning represents warning
.danger represents danger or wrong behavior

In addition to .active, the other four class names should be coordinated with .table-hover

Form

.form-horizontal horizontal form effect, matching the grid system of the Bootstrap framework; setting the form control padding and margin values; changing the expression of "form-group", similar to the "row" of the grid system
When using input in Bootstrap, you must also add the type type. In order to make the control style correct in various form styles, you need to add .form-control. Multi-row selection sets the value of the multiple attribute to multiple. Rows defines the height, and cols sets the width. .form-control, there is no need for cols
Both checkbox and radio use the label package
If the checkbox needs to be arranged horizontally, you only need to add the class name "checkbox-inline" to the label label

Fixed navigation bar

The top and bottom of the main content of the page All are covered by the fixed navigation bar. In order to prevent the fixed navigation bar from covering the content, we need to do some processing on the body:

body {
padding-top: 70px;/*有顶部固定导航条时设置*/
padding-bottom: 70px;/*有底部固定导航条时设置*/
}
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
 …
</div>

In fact, in addition to this solution, we have other solutions, placing the fixed navigation bar on the page content Front:

<div class="navbar navbar-default navbar-fixed-bottom" role="navigation">
 …
</div>
<div class="content">我是内容</div>

Add the following style code in the file:

.navbar-fixed-top ~ .content {
padding-top: 70px;
}
.navbar-fixed-bottom ~ .content {
padding-bottom: 70px;
}

The above is a summary of Bootstrap class styles introduced by the editor. I hope it will be helpful to everyone

Statement
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.