BootstrapOfficial Production:BootstrapVueCheck it out on the official website
About tool styles,Official Documentation (Fast Gate)
About display, examples of common tool styles(Bootstrap Version>=v4)
Regarding
display, specify the type of rendered frame of the element,Official Documentation (Fast Gate), common are:
Specified as an inline element1
<div class="d-inline">d-inline</div>
Specified as a stream element
1
<div class="d-flex">d-flex</div>
The following definition can be found in
_variables.scss, see the previous blog post on how to find this file:1
$displays: none, inline, inline-block, block, table, table-row, table-cell, flex, inline-flex !default;
Usage: The optional value of
valueis the category defined inscssabove, and the optional value ofbreakpointissm,md,lg,xl, which means that it takes effect only in the case of{breakpoint}1
2.d-{value} for xs
.d-{breakpoint}-{value} for sm, md, lg, and xl.Examples are as follows:
Render effect Style Hide .d-noneHide only if the screen size meets xs.d-none .d-sm-block` Hide only if the screen size meets sm.d-sm-none .d-md-blockHide only if the screen size meets xl.d-xl-noneVisible .d-blockVisible only if the screen size meets lg.d-none .d-lg-block .d-xl-noneRegarding the
flextype indisplay, [Official Documentation (Fast Gate)] (https://getbootstrap.com/docs/4.3/utilities/flex/), common ones are:
Specifies the container as the stream type1
<div class="d-flex">I'm a flexbox container!</div>
Specifies the container unit as the stream type
1
<div class="d-inline-flex">I'm an inline flexbox container!</div>
Specify the flow direction for the flow type:
1
2
3
4
5<div class="d-flex flex-row">
<div>Flex item 1</div>
<div>Flex item 2</div>
<div>Flex item 3</div>
</div>Usage: The optional value of
valueisrow/column, if the direction is reversed,reverseis appended to the end of the style, and the optional value ofbreakpointissm,md,lg,xl, which means that it takes effect only in the case of{breakpoint}1
2.flex-{value} for xs
.flex-{breakpoint}-{value} for sm, md, lg, and xl.Examples are as follows:
Render effect Style Horizontal .flex-rowReverse the horizontal .flex-row-reverseReverse the vertical direction .flex-column-reverseOnly vertically if the screen pixel size meets sm.flex-sm-columnReverse vertical direction only if the screen pixel size meets sm.flex-sm-column-reverseSpecify the major axis (x-axis, y-axis direction) alignment for the stream type:
Center alignment:1
<div class="d-flex justify-content-center">...</div>
Usage: The optional value of
valueisstart/end/center/between/around, and the optional value ofbreakpointissm,md,lg,xl, which means that it takes effect only when{breakpoint}1
2.justify-content-{value} for xs
.justify-content-{breakpoint}-{value} for sm, md, lg, and xl.Render effect style Center align .justify-content-centerOnly center align if the screen pixel size meets sm.justify-content-sm-centerSpecify the cross-axis (x-axis, y-axis) alignment for the flow type:
1
<div class="d-flex align-items-start">...</div>
Usage: The optional value of
valueisstart/end/center/baseline/stretch, and the optional value ofbreakpointissm,md,lg,xl, which means that it takes effect only when{breakpoint}1
2-items-{value} for xs
-items-{breakpoint}-{value} for sm, md, lg, and xl.Rendering effect style Center align .align-items-centerOnly center align if the screen pixel size meets sm.align-items-sm-center
The commonly used display-related styles are written here for the time being.
If you like this blog or find it useful for you, you are welcome to comment on it. You are also welcome to share this blog, so that more people can participate in it. If the images used in the blog infringe your copyright, please contact the author to delete them. Thank you !