Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,038

HOME > HTML/CSS Manual > @font-face Attribute


Send To Friend.Bookmark.

@font-face Attribute

@font-face { font-family: <font-family> ; url(<URL>); }

Specifies a font to embed into your HTML document. This feature allows you to use specific fonts that might not be available on your local system. The URL should point to an embedded OpenType file (.eot or .ote format). The file contains compressed, subsetted font data that is converted to a TrueType font and installed by T2embed.dll.

The example below shows how to embed a font in an HTML document by referencing its source from another site.

<html>

<head>

<style>

@font-face {font-family:comic;

src:url(http://axtest/tritest/beta2styles/fonts/comicbold.eot);}

</style>

<title>Font embedding using the @font-face</title>

</head>

<body>

<p style="font-family:comic;font-size:18pt">this line uses @font face defined in the above style element section using comic sans ms bold in 18pt.</p>

</body>

</html>

The following example uses an in-line style.

<html>

<head>

<title>Font embedding using the @font-face</title>

<body>

<p style="@font-face comic{src:url(http://axtest/tritest/beta2styles/fonts/comicbold.eot);} this is an in-line style example of the @font face attribute using comic sans ms bold font.

</body>

</html>

Another example uses the STYLE element to combine several style sheets.

<STYLE>

@import url(http://somepartialstylesheet);

@import url(http://someotherstylesheet);

h3 {color:yellow}

</STYLE>


ThaiCreate.Com Forum
Comunity Forum Free Web Script
Jobs Freelance Free Uploads
Free Web Hosting Free Tools

สอน PHP ผ่าน Youtube ฟรี
สอน Android การเขียนโปรแกรม Android
สอน Windows Phone การเขียนโปรแกรม Windows Phone 7 และ 8
สอน iOS การเขียนโปรแกรม iPhone, iPad
สอน Java การเขียนโปรแกรม ภาษา Java
สอน Java GUI การเขียนโปรแกรม ภาษา Java GUI
สอน JSP การเขียนโปรแกรม ภาษา Java
สอน jQuery การเขียนโปรแกรม ภาษา jQuery
สอน .Net การเขียนโปรแกรม ภาษา .Net
Free Tutorial
สอน Google Maps Api
สอน Windows Service
สอน Entity Framework
สอน Android
สอน Java เขียน Java
Java GUI Swing
สอน JSP (Web App)
iOS (iPhone,iPad)
Windows Phone
Windows Azure
Windows Store
Laravel Framework
Yii PHP Framework
สอน jQuery
สอน jQuery กับ Ajax
สอน PHP OOP (Vdo)
Ajax Tutorials
SQL Tutorials
สอน SQL (Part 2)
JavaScript Tutorial
Javascript Tips
VBScript Tutorial
VBScript Validation
Microsoft Access
MySQL Tutorials
-- Stored Procedure
MariaDB Database
SQL Server Tutorial
SQL Server 2005
SQL Server 2008
SQL Server 2012
-- Stored Procedure
Oracle Database
-- Stored Procedure
SVN (Subversion)
แนวทางการทำ SEO
ปรับแต่งเว็บให้โหลดเร็ว


Hit Link
   





ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2025 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่