Cov ntawv sau yog qhov tseem ceeb ntawm cov qauv siv lub vev xaib, muab qhov chaw sib txawv. Cov ntawv nyeem zoo nyob rau nplooj ntawv yuav tsum saib zoo, muaj kev sib xyaw nrog tus so ntawm lub xaib thiab tib lub sijhawm ua rau muaj kev nkag siab zoo dua ntawm cov ntaub ntawv. Siv HTML markup thiab CSS cascading cov ntxhuav, koj tuaj yeem kho yuav luag txhua qhov teeb tsa kom ua kom tiav cov nplooj ntawv siab.
Tsim nyog
siv ntawv sau ua hom ntawv TTF
Cov Lus Qhia
Kauj ruam 1
Txhawm rau siv cov ntawv fonts raug teeb tsa ntawm koj lub khoos phis tawm, koj tuaj yeem siv font-family parameter ntawm cov ntawv ci style cascading. Txhawm rau ua qhov no, sau cov cai hauv qab no rau cov yam xav tau:
Ntawv
Qhov hais kom ua no yuav ua rau pom qib thib ob h2 nyob rau hauv Arial typeface.
Kauj ruam 2
Yog tias koj xav siv koj tus kheej lub font, koj yuav tsum xub muab nws xa mus rau lub hosting thiab pab nws siv cov lus txib kom tsim nyog. Cov ntaub ntawv TTF suav nrog qhov hais kom ua hauv qab no:
Qhov ntaus cim ua cim hauv tsev neeg nyob rau hauv rooj plaub no qhia meej lub npe ntawm tus qauv siv, thiab src: url (font.ttf) qhia meej txoj hauv kev rau TTF cov ntawv.
Kauj ruam 3
Tom qab ua kom pom lub caij, koj tuaj yeem siv nws los qhia cov ntawv sau:
Ntawv
Qhov kev hais kom ua no yog lub luag haujlwm los tso saib kab ntawv uas yuav tsum muaj nyob hauv cov ntawv sau hauv qab ntawm qib thib ob. Yog tias tus neeg siv lub browser tsis txhawb nqa tuav cov ntaub ntawv TTF, lub kaw lus font uas teev tom qab thawj sau (qhov no, Verdana) yuav raug siv.
Kauj ruam 4
Qee qhov browser tsis txhawb nqa rub tawm TTF. Piv txwv, Internet Explorer 8 siv EOT hom ntawv los qhia cov ntawv sau. Rau cov browsers zoo li no, hloov tus thawj TTF uas siv ntau yam kev pabcuam thiab suav nrog qhov ua kom tau txais qhov tshwm sim hauv lub @ font-ntsej muag parameter hauv tib txoj kev.
Kauj ruam 5
Yog tias koj xav import cov ntaub ntawv uas koj xav tau los ntawm lwm qhov chaw siv, siv @import cov lus txib, uas yuav tsum tau sau rau sab saum toj ntawm daim ntawv CSS:
@import url (https:// font_address)