不同的呈現(display)方式
一、套用display方法
xs : .d-{value}
sm, md, lg, xl : .d-{breakpoint}-{value}
value 可換成 :
none
inline
inline-block
block
table
table-cell
table-row
flex
inline-flex
範例 :
隱藏元素
例子 : .d-none .d-md-block .d-lg-none 將隱藏所有螢幕尺寸的元素,除了中型(lg)和大型(xl)設備
螢幕大小 | class |
Hidden on all | .d-none |
Hidden only on xs | .d-none .d-sm-block |
Hidden only on sm | .d-sm-none .d-md-block |
Hidden only on md | .d-md-none .d-lg-block |
Hidden only on lg | .d-lg-none .d-xl-block |
Hidden only on xl | .d-xl-none |
Visible on all | .d-block |
Visible only on xs | .d-block .d-sm-none |
Visible only on sm | .d-none .d-sm-block .d-md-none |
Visible only on md | .d-none .d-md-block .d-lg-none |
Visible only on lg | .d-none .d-lg-block .d-xl-none |
Visible only on xl | .d-none .d-xl-block |
運用在列印
例子 :
class |
.d-print-none |
.d-print-inline |
.d-print-inline-block |
.d-print-block |
.d-print-table |
.d-print-table-row |
.d-print-table-cell |
.d-print-flex |
.d-print-inline-flex |
Last updated