Cov txheej txheem:

Cov ntaub ntawv tsawg dua ua haujlwm li cas?
Cov ntaub ntawv tsawg dua ua haujlwm li cas?

Video: Cov ntaub ntawv tsawg dua ua haujlwm li cas?

Video: Cov ntaub ntawv tsawg dua ua haujlwm li cas?
Video: Mus Hauj Lwm Kaus Lim Yuav Npaj Ntaub Ntawv Li Cas? Hnub Nyug TsawgXyoo?Kawm Ntawv Kaus Lim Li Cas? 2024, Kaum ib hlis
Anonim

Tsawg dua muab ib haiv neeg hais kom ua kab interface (CLI), lessc, uas ua haujlwm ntau yam haujlwm dhau los tsuas yog sau cov Tsawg dua syntax. Peb siv CLI ua tau lint cov lis dej num, compress cov cov ntaub ntawv , thiab tsim ib daim ntawv qhia chaw. Cov lus txib yog nyob ntawm Node. js uas zoo tso cai rau cov lus txib ua haujlwm thoob plaws Windows, OS X, thiab Linux.

Ib yam li ntawd, cov ntaub ntawv tsawg dua yog dab tsi?

Tsawg dua (Leaner Style Sheets; qee zaum stylized li Tsawg dua ) yog dynamic preprocessor style sheet lus uas tuaj yeem muab tso ua ke rau hauv Cascading Style Sheets (CSS) thiab khiav ntawm tus neeg siv khoom lossis sab server. Indented syntax ntawm Tsawg dua yog ib qho nested metalanguage, raws li siv tau CSS yog siv tau Tsawg dua code nrog tib semantics.

Ib yam li ntawd, dab tsi tsawg dua hauv kev txhim kho lub vev xaib? Txheej txheem cej luam. Tsawg dua (uas sawv cev rau Leaner Style Sheets) yog cov lus rov qab sib txuas ntxiv rau CSS. Nov yog cov ntaub ntawv raug cai rau Tsawg dua , lus thiab Tsawg dua . js, lub cuab yeej JavaScript uas hloov koj Tsawg dua styles rau CSS styles. Vim Tsawg dua zoo li CSS, kawm nws yog ib qho yooj yim.

Yog li ntawd, CSS ua haujlwm tsawg dua li cas?

Tsawg dua tau tsim los kom ze li ntawm CSS raws li qhov ua tau, yog li cov syntax zoo ib yam rau koj tam sim no CSS code. Qhov no txhais tau tias koj tuaj yeem siv tam sim ntawd nrog koj tus lej uas twb muaj lawm. Tsis ntev los no, Sass kuj tau qhia ib CSS -zoo li syntax hu ua SCSS (Sassy CSS ) ua kom yooj yim tsiv teb tsaws chaw.

Yuav ua li cas koj siv tsawg variables?

Cov kev sib txawv tuaj yeem siv ncaj qha, raws li kev siv, hauv ib txoj hlua lossis los tsim qhov chaw ntawm cov qauv ntawv

  1. ncaj qha. Siv @ syntax siv tus nqi sib txawv ncaj qha: @number: 10; h1 {loj: @number; }
  2. Raws li siv.
  3. Sab hauv Khoom Lub Npe.
  4. Sab hauv hlua.
  5. Daim Ntawv Txheej Txheem.

Pom zoo: