Cov txheej txheem:

Dab tsi yog kev siv cov duab thaiv hauv CSS?
Dab tsi yog kev siv cov duab thaiv hauv CSS?

Video: Dab tsi yog kev siv cov duab thaiv hauv CSS?

Video: Dab tsi yog kev siv cov duab thaiv hauv CSS?
Video: Zaj Dub - Cas Tsis Xaiv Koj_Nkauj Tawm Tshiab [Official MV] 2024, Kaum ib hlis
Anonim

Cov tso saib CSS cov cuab yeej teev seb lub ntsiab puas raug kho raws li a thaiv los yog inline element thiab layout siv rau nws cov me nyuam, xws li ntws layout, kab sib chaws los yog flex.

Kuj paub, dab tsi yog tso saib inline block txhais li cas hauv CSS?

CSS Layout - tso saib : hauv kab - thaiv Piv rau tso saib : hauv kab , qhov sib txawv loj yog uas tso saib : hauv kab - thaiv tso cai rau teeb tsa qhov dav thiab qhov siab ntawm lub caij. Kuj, nrog tso saib : hauv kab - thaiv , sab saum toj thiab hauv qab margins / paddings yog hwm, tab sis nrog tso saib : hauv kab lawv tsis yog.

Tsis tas li ntawd, cov zaub txhais li cas hauv HTML? Txhais thiab siv The tso saib vaj tse qhia cov tso saib cwj pwm (hom rendering box) ntawm ib lub caij. Hauv HTML , lub neej ntawd tso saib khoom muaj nqis yog muab los ntawm HTML specifications los yog los ntawm tus browser/neeg siv default style ntawv. Tus nqi pib hauv XML yog inline, suav nrog cov ntsiab lus SVG.

Ua li no, hom zaub hauv CSS yog dab tsi?

Cia peb mus dhau ntawm txhua qhov no, thiab tom qab ntawd npog qee qhov ntawm lwm qhov tsis tshua muaj txiaj ntsig

  • Hauv kab. Tus nqi pib rau cov ntsiab lus.
  • Inline Block. Ib lub ntsiab lus teem rau inline-block yog zoo ib yam li inline nyob rau hauv uas nws yuav teem inline nrog lub ntuj ntws ntawm cov ntawv nyeem (ntawm "baseline").
  • Thaiv.
  • Khiav-hauv.
  • Flexbox.
  • Flow-Root.
  • Tsis muaj.

Dab tsi yog qhov txawv ntawm cov duab tsis muaj thiab cov duab thaiv?

Zaub : tsis muaj ; txhais tau hais tias lub ntsiab yuav tsis yog tso tawm , thiab Zaub : thaiv ; txhais tau tias lub ntsiab yog nthuav tawm as a thaiv -level element (xws li kab lus thiab headers).

Pom zoo: