CSS3 Custom Fonts
5 posts
Page 1 of 1
Custom fonts have been used on the web before CSS3 came out, but what we had to do was apply it in an image. We'll that time is gone now. We can add it right into our styling in CSS, and you've probably seen me do this already with the JavaScript Calculator, as well as NoteTaker.
So lets begin shall we?
NOTE: I'll be using the English font as an example.
First define your font, by giving it a name, and then grab the font url. (Caps matter)
Here's a small example.
So lets begin shall we?
NOTE: I'll be using the English font as an example.
First define your font, by giving it a name, and then grab the font url. (Caps matter)
Code: Select all
Now that you've defined the font, whatever name you used you'd use that name to apply that custom font family in CSS3.@font-face {
font-family:English;
src:url('fonts/English.ttf');}
Here's a small example.
Code: Select all
div#example {
font-family:ThinTxt;
font-size:40px;
color:silver;}
wow cool
thanks for sharing didn't know that
thanks for sharing didn't know that
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
Or you could use Google Web Fonts:
http://www.google.com/webfonts#ChoosePlace:select
http://www.google.com/webfonts#ChoosePlace:select
We shall let the revolution begin.. the revolution for freedom, freedom against censorship. We shall fight in the fields and in the streets, we shall fight in the hills; we shall never surrender
Thanks for the tip Codex. However I still recommend my tip from above, as it'll make the page load faster, and you're not hyperlinking as the font should be on your hosting account.
5 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023