Home >
php教程 >
PHP开发 >
Summary of Bootstrap's class styles
Summary of Bootstrap's class styles
高洛峰
Release: 2016-12-03 10:42:59
Original
1202 people have browsed it
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:
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