condensed
ultra-condensed
extra-condensed
semi-condensed
expanded
semi-expanded
extra-expanded
ultra-expanded Specifies whether text is wider or narrower. The default value is "normal". font-style normal
italic
oblique (Optional) Define font-style. The default value is "normal". font-weight normal
bold
100
200
300
400
500
600
700
800
900 (Optional) Determine the font-weight. The default value is "normal". unicode-range unicode-range Specifies the range of UNICODE characters that the font supports. The default value is "U + 0-10FFFF".
Example 1: Use the font you want
@font-face {
font-family: FontQuanTriMang;
src: url(sansation_light.woff);
}
div {
font-family: FontQuanTriMang;
}
Results show:
Full code:
An empty street
An empty house
A hole inside my heart
I'm all alone
The rooms are getting smaller
I wonder how
I wonder why
I wonder where they are
The days we had
The songs we sang together
Oh yeah
And all my love
I'm holding on forever
Reaching for the love that seems so far
So I say a little prayer
And hope my dreams will take me there
Where the skies are blue
To see you once again, my love
Over seas from coast to coast
To find the place I love the most
Where the fields are green
To see you once again, my love
Example 2: Use bold letters
@font-face {
font-family: FontQuanTriMang;
src: url(sansation_bold.woff);
font-weight: bold;
}
"sansation_bold.woff" is another font file, containing bold characters for Sansation fonts in example 1.
The browser will use this format whenever the text with the font "FontQuanTriMang" is bold.
Full code:
Just a smile and the rain is gone
Can hardly believe it (yeah)
There's an angel standing next to me
Reaching for my heart
Just a smile and there's no way back
Can hardly believe it (yeah)
But there's an angel and she's calling me
Reaching for my heart
I know, that I'll be ok now
This time it's real
I lay my love on you
It's all I want to do
Every time I breathe I feel brand new
You open up my heart
Show me all your love, and walk right through
As I lay my love on you
Previous article: Some properties of handling Text in CSS
Next lesson: 2D Transform in CSS