Z-index a ɛwɔ hɔ
Bere a ɛnyɛ Bootstrap grid nhyehyɛe no fã no, z-indexes di dwuma titiriw wɔ sɛnea yɛn afã horow no kata wɔn ho so na wɔne wɔn ho wɔn ho di nkitaho no mu.
Bootstrap afã horow pii de di dwuma z-index
, CSS agyapade a ɛboa ma wɔhwɛ nhyehyɛe so denam axis a ɛto so abiɛsa a wɔde ma de hyehyɛ nsɛm no so. Yɛde default z-index scale di dwuma wɔ Bootstrap mu a wɔayɛ sɛ ɛbɛma layer navigation, adwinnade ho nsɛm ne popovers, modals, ne nea ɛkeka ho yiye.
Saa gyinapɛn ahorow a ɛkorɔn yi fi ase wɔ dodow a wɔmpɛ so, a ɛkorɔn na ɛyɛ pɔtee sɛnea ɛbɛyɛ a ɛbɛyɛ papa sɛ wɔbɛkwati ntawntawdi. Yɛhia eyinom a wɔahyehyɛ no gyinapɛn wɔ yɛn afã horow a wɔayɛ no ntoatoaso no nyinaa mu —adwinnade ho nsɛm, popovers, navbars, dropdowns, modals —sɛnea ɛbɛyɛ a yebetumi ayɛ nea ɛfata wɔ nneyɛe no mu. Biribiara nni hɔ a enti anka yɛrentumi mfa 100
+ anaa 500
+ nni dwuma.
Yɛnhyɛ saa ankorankoro gyinapɛn ahorow yi a wɔbɛsakra no ho nkuran; sɛ wosakra biako a, ɛda adi sɛ ɛsɛ sɛ wosakra ne nyinaa.
$zindex-dropdown: 1000;
$zindex-sticky: 1020;
$zindex-fixed: 1030;
$zindex-offcanvas-backdrop: 1040;
$zindex-offcanvas: 1045;
$zindex-modal-backdrop: 1050;
$zindex-modal: 1055;
$zindex-popover: 1070;
$zindex-tooltip: 1080;
$zindex-toast: 1090;
Sɛ yɛbɛdi ahyeɛ a ɛka bom wɔ afã ahodoɔ no mu ho dwuma (sɛ nhwɛsoɔ no, bɔtɔn ne nsɛm a wɔde hyɛ mu wɔ nsɛm a wɔde hyɛ mu akuo mu), yɛde digit baako z-index
botaeɛ a ɛba fam a ɛyɛ 1
, 2
, ne 3
default, hover, ne active states di dwuma. Wɔ hover/focus/active so no, yɛde element pɔtee bi ba anim a ɛwɔ z-index
bo a ɛkorɔn de kyerɛ wɔn hye wɔ anuanom element ahorow no so.