Nānā nui
ʻO nā ʻāpana a me nā koho no ka waiho ʻana i kāu papahana Bootstrap, e komo pū ana i nā ipu wīwī, kahi ʻōnaehana māka ikaika, kahi mea media maʻalahi, a me nā papa hana pane.
ʻO nā pahu ka mea hoʻonohonoho maʻamau ma Bootstrap a koi ʻia i ka wā e hoʻohana ai i kā mākou ʻōnaehana grid default . E koho mai kahi pahu pane, paʻa-ākea (ʻo ia hoʻi kona max-width
hoʻololi ʻana i kēlā me kēia haʻihaʻi) a i ʻole ka laula-wai (ʻo ia hoʻi, he 100%
ākea i nā manawa a pau).
ʻOiai hiki ke hoʻopaʻa ʻia nā ipu, ʻaʻole pono ka hapa nui o nā hoʻolālā i kahi ipu pūnana.
E hoʻohana .container-fluid
no ka ipu laula piha, me ka laula holoʻokoʻa o ke awa ʻike.
No ka mea ua hoʻomohala ʻia ʻo Bootstrap e lilo i kelepona mua, hoʻohana mākou i kahi liʻiliʻi o nā nīnau media no ka hana ʻana i nā breakpoints noʻonoʻo no kā mākou papahana a me nā pilina. Hoʻokumu ʻia kēia mau wahi haʻihaʻi ma luna o nā ākea viewport liʻiliʻi a ʻae iā mākou e hoʻonui i nā mea e like me ka loli ʻana o ka viewport.
Hoʻohana mua ʻo Bootstrap i nā pae hulina media—a i ʻole nā wahi haʻihaʻi—i loko o kā mākou kumu waihona Sass no kā mākou hoʻonohonoho, ʻōnaehana pūnaewele, a me nā ʻāpana.
No ko mākou kākau ʻana i kā mākou kumu CSS ma Sass, loaʻa kā mākou mau nīnau media āpau ma o Sass mixins:
Hoʻohana mākou i kekahi manawa i nā nīnau media e hele ana i kahi ʻaoʻao ʻē aʻe (ka nui o ka pale i hāʻawi ʻia a i ʻole ka liʻiliʻi ):
No ka mea, ʻaʻole kākoʻo nā mākaʻikaʻi i kēia manawa i nā nīnau pōʻaiapili , hana mākou i nā palena a min-
me max-
nā prefix a me nā puka ʻike me nā laula haʻihaʻi (hiki ke hana ʻia ma lalo o kekahi mau kūlana ma nā hāmeʻa kiʻekiʻe-dpi, no ka laʻana) ma ka hoʻohana ʻana i nā waiwai me ka pololei o kēia mau hoʻohālikelike. .
Eia hou, loaʻa kēia mau nīnau media ma o Sass mixins:
Aia kekahi mau nīnau a me nā huila no ka huli ʻana i kahi ʻāpana o ka nui o ka pale e hoʻohana ana i ka laulā haʻahaʻa haʻahaʻa loa.
Loaʻa kēia mau nīnau media ma o Sass mixins:
Pēlā nō, hiki i nā nīnau media ke hoʻopaʻa i nā ākea breakpoint he nui:
ʻO ka Sass mixin no ka huli ʻana i ka nui o ka pale like:
Hoʻohana kekahi mau ʻāpana Bootstrap z-index
, ka waiwai CSS e kōkua i ka hoʻokele ʻana i ka hoʻolālā ma o ka hāʻawi ʻana i ke kolu ʻekolu e hoʻonohonoho i ka ʻike. Hoʻohana mākou i kahi pālākiō z-index paʻamau i Bootstrap i hoʻolālā ʻia e hoʻonohonoho pono i ka hoʻokele, nā mea hana a me nā popovers, modals, a me nā mea hou aku.
Hoʻomaka kēia mau waiwai kiʻekiʻe ma kahi helu kūʻokoʻa, kiʻekiʻe a kikoʻī e pale pono ai i nā paio. Pono mākou i kahi hoʻonohonoho maʻamau o kēia mau mea ma waena o kā mākou ʻāpana i hoʻopaʻa ʻia - nā mea hana, popovers, navbars, dropdowns, modals - no laila hiki iā mākou ke kūpaʻa kūpono i nā ʻano. ʻAʻohe kumu i hiki ʻole ai iā mākou ke hoʻohana 100
+ a i ʻole 500
+.
ʻAʻole mākou paipai i ka hoʻopilikino ʻana i kēia mau waiwai pākahi; inā ʻoe e hoʻololi i hoʻokahi, pono paha ʻoe e hoʻololi iā lākou a pau.
No ka lawelawe ʻana i nā palena ʻāwili i loko o nā ʻāpana (e laʻa, nā pihi a me nā mea hoʻokomo i nā pūʻulu hoʻokomo), hoʻohana mākou i nā helu helu haʻahaʻa haʻahaʻa z-index
o 1
, 2
, a 3
no ka paʻamau, hover, a me nā kūlana hana. Ma ka hover/focus/active, lawe mākou i kekahi mea i mua me ka z-index
waiwai kiʻekiʻe e hōʻike i ko lākou palena ma luna o nā mea kaikaina.