ComputersSoftware

CSS Box: impromptu thiab cov nyhuv

Lam style los xij (CSS) rau tag nrho nws cov zajlus kom simplicity ua rau nws tau tsis tsuas los ua ib tug spectacular tsim tshuaj, tab sis kuj muab cov ntsiab ntawm cov tiag tiag txiav txim, ua raws qhov kev kawm ntawm lub sij code.

Tej nrig txog kev pom tag HTML-npav - ib lub cheeb tsam ntawm ib tug qauv, thiab cov ntsiab lus. Lub caij muaj ib tug hais txog ntawm lub coordinates, loj, me, padding, xim, font, font style, thiab li ntawd. Ncej CSS-caij qhia rau lawv nyob ib cheeb tsam, yog nyob inward los ntawm nws cov thaj tsam nyob rau hauv xws no dav.

syntax hauj lwm

Teb kev tso kawm caij teev tswj txheeb ze mus rau lub Upper rau sab laug ces kaum ntawm lub sab (sab laug, sab saum toj), qhov luaj li cas nyob rau hauv lub kab rov tav thiab ntsug kev qhia (dav, qhov siab). Tag nrho cov tsim thiab animation hais no yog ua los nyob rau hauv officers "vaj tse: tus nqi".

Hauj lwm yog ua li cas ncaj qha nyob rau hauv cov nplooj ntawv code mus tau ntxig style los yog nyob rau hauv ib tug nyias muaj nyias ib cov ntaub ntawv, taw tes rau nws LINK siv. syntax:

#name {vaj tse: tus nqi; vaj tse: tus nqi; vaj tse: tus nqi; ...}

los yog

.name {vaj tse: tus nqi; vaj tse: tus nqi; vaj tse: tus nqi; ...}

Lub npe kuj yuav p, lub cev, html, cov lus, td ..., uas yog ib lub npe ntawm HTML-markup tag. Tej zaum yuav nrog ncaj nraim nrog qhov kev piav qhia ntawm cov style lub caij.

Ua ntej koj yuav ua li kuv tus kheej sau ntawv style, tsis mob saib yuav ua li cas nws yuav ua li cas rau nrov chaw, kom cov nplooj ntawv code, los yog nias Ctrl-U mus saib nws ncaj qha nyob rau hauv lub browser.

Lub ntsiab tsis

Ua tau CSS ncej caij sawv cev style (ciam teb-style), xim (ciam teb-xim), dav (ciam teb dav). Nws muaj peev xwm tag nrho cov tau summed nyob rau hauv ib tug tej khoom vaj tse - ciam teb. Koj yeej piav qhia tau ib kablus ciam teb ntawm nws tus kheej (ciam teb-sab saum toj, ciam teb hauv qab, ciam teb sab laug, ciam teb-txoj cai).

CSS ncej piav los ntawm cov kev cai ntawm kev lam style xij:

ciam teb: 3px;
ciam teb-xim: liab;
ciam teb-style: muab ob npaug rau dashed khoom dotted.

Qhov no qhia teev tus ciam teb dav ntawm 3 pixels, xim - liab, style sab: sab ntawm lub ob, txoj cai - lov, khoom qab, sab laug - point.

ciam teb dav: 1px 2px 4px 8px;
ciam teb-xim: xiav;
ciam teb-style: dotted.

Ntawm no, cov qhov ntev ntawm ib sab tseem sequentially los ntawm sab saum toj, clockwise, xim - xiav, thiab style - Spot.

ciam teb-xim: xiav liab ntsuab dub;

nyob rau hauv no specification, ib lub zuj zus teev xim rau txhua sab. ciam teb vaj tse yuav muaj xws li ntau yam tsis, lub thiab ces kaum ntawm lub thav duab yuav ua tau round:

ciam teb: 1px ntsuab khoom;
ciam teb-voos kheej-kheej: 0px 4px 8px 12px;
-moz-ciam teb puag ncig: 0px 4px 8px 12px;
-webkit-ciam teb-voos kheej-kheej: 0px 4px 8px 12px;

Yuav ua li cas yuav ua rau tus ncej nyob rau hauv CSS, nws nyob ntawm lub usability ntawm lub qhua, vim hais tias feem ntau cov stylistic nyhuv yog siv rau kev hom phiaj, thaum nws yog ib qho tseem ceeb qhia cov chaw qhia kiag thiab luaj li cas ntawm cov cheeb tsam nyob rau sab.

Lub thickness ntawm tus ncej thiab nws cov hom phiaj

By xaiv lub thickness ntawm tus ncej, koj muaj peev xwm siv px, pt, em ..., tab sis nws yuav tsum tau borne nyob rau hauv lub siab hais tias nws yog ib txwm nyob rau hauv lub teb lub caij. Nws yog ib qhov nyuaj rau xav hais tias cov ncej no muaj ib tug CSS tsim lub hom phiaj, tab sis technically nws yog heev pab tau mus rau ntsiab lub ntsiab ntawm cov nplooj ntawv.

Yog hais tias lub ntsiab ncej chav kawm ntawv yog muab tub, uas yog tsis tuaj kawm ntawv, los ntawm specifying nws nyob rau hauv pseudo-class: yuj, nws yuav tsum tau qhia rau cov qhua ntawm cov nplooj ntawv lub caij, thaum nws yog tus nas cursor, xws li qhov tseem ceeb rau ib tug zaub mov yam khoom. Tej zaum nws yog tsim nyog los xaiv ib yam dab tsi los txhaj rau cov duab, los yog luag ib yam dab tsi rau ib qhov twg. Nws yog heev yooj yim mus siv dot ncej, thiab tsis tau hloov lub caij lub keeb kwm yav dhau los nws txheem.

Ib txhia daim ntaub ntawv yuav tsum tau cov kev faib nyiaj rau tej thaj chaw ntawm cov nplooj ntawv, los yog xaiv khoom rau ntxiv ua. Nyob rau hauv cov ntaub ntawv no, thaum lub sij hawm ntawm cov nias los ua ib tug div nrog ib tug ciam teb thiab ntev li ntev raws li tus qhua tsis tso tus nas khawm, resize nws, uas qhia visually lub txiaj ntsim ntawm kev xaiv.

Sab nraum raws li

CSS tutorials yog heev nthuav, raws li yog qhov tseem ceeb ntawm cov kev tshawb fawb cov lis dej num nplooj ntawv ntawm nrov chaw. Txawm li cas los, tus kheej pab yuav tsum cim, nws yuav tsum muaj nws tus kheej lub ntsej muag.

Muab lub syntax ntawm CSS ncej tsis muab xws li ib tug ntau yam, raws li nws tus kheej teg num. Impromptu - ib tug zoo pib, thiab tsis muaj dab tsi tiv thaiv tus tsim tawm los tsim kom tau lawv tus kheej lub cev. Tshwj xeeb tshaj yog nrog tag nrho cov achievements ntawm Internet technology thiab muaj peev xwm uas twb muaj lawm cov qauv muaj ntau pheej tswv yim raws li tiag tiag shortcomings ntawm uas twb muaj lawm syntax, uas yog (los ntawm txhais) yeej ib txwm tau ib tug ncaj qha kev.

Nyob rau hauv kev, yog thiab tsim kom muaj lub Scope ntawm tej ntsiab, no mas, tsim nyog ua li ntawd comprehensively. Qhov tseem ceeb ib tug neeg cim npe nyob rau hauv lub sab thiab cov ces kaum ntawm ib thaj av, koj yuav txais amazing teebmeem. Ib tug muab cov handlers, muaj peev xwm tsim dynamic page hais, hloov rau txoj hauj lwm, zoo thiab cov ntsiab lus.

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

Copyright © 2018 hmn.unansea.com. Theme powered by WordPress.