Cssom yog dab tsi?
Cssom yog dab tsi?

Video: Cssom yog dab tsi?

Video: Cssom yog dab tsi?
Video: Shaolin Soccer : Le gardien surpuissant 2024, Kaum ib hlis
Anonim

CSSOM stands rau CSS Object Model. Nws yog ib qho "daim ntawv qhia" ntawm CSS styles pom ntawm nplooj ntawv web. Nws zoo li DOM, tab sis rau CSS ntau dua li HTML. Cov CSSOM ua ke nrog DOM yog siv los ntawm browsers los tso saib nplooj ntawv web.

Ua li no, DOM tsim li cas?

Yuav ua li cas yog DOM tsim (thiab nws zoo li cas)? Cov DOM yog ib qho khoom siv sawv cev ntawm cov ntaub ntawv HTML. Nws muaj qee qhov sib txawv, raws li peb yuav pom hauv qab no, tab sis nws yog qhov tseem ceeb rau kev sim hloov cov qauv thiab cov ntsiab lus ntawm cov ntaub ntawv HTML rau hauv cov qauv khoom uas tuaj yeem siv los ntawm ntau yam kev pab cuam.

Kuj Paub, CSS DOM yog dab tsi? Txog ntawm DOM A DOM muaj tsob ntoo zoo li tus qauv. Txhua lub ntsiab lus, tus cwj pwm, thiab cov ntawv nyeem hauv cov lus cim ua ib qho DOM node nyob rau hauv tsob ntoo qauv. To taub cov DOM pab koj tsim, debug thiab tswj koj CSS vim cov DOM nyob qhov twg koj CSS thiab cov ntaub ntawv cov ntsiab lus sib ntsib.

Tom qab ntawd, ib tug kuj yuav nug, ua li cas browser rendering ua hauj lwm?

Thaum lub web page yog loaded, lub browser thawj zaug nyeem TEXT HTML thiab tsim DOM Tsob Ntoo los ntawm nws. Tom qab ntawd nws ua cov CSS seb qhov ntawd yog inline, kos lossis sab nraud CSS thiab tsim CSSOM Ntoo los ntawm nws. Tom qab cov ntoo no tsim, ces nws tsim lub Render - Tsob ntoo los ntawm nws.

DOM browser yog dab tsi?

Cov Ntaub Ntawv Object Model ( DOM ) yog qhov programming interface rau HTML thiab XML cov ntaub ntawv. Cov DOM yog ib qho khoom sawv cev ntawm nplooj ntawv web, uas tuaj yeem hloov kho nrog cov lus sau xws li JavaScript. W3C ua DOM thiab WHATWG DOM cov qauv yog siv nyob rau hauv feem ntau niaj hnub browsers.

Pom zoo: