网页引用本地电脑的字体 css设置浏览器会不显示的解决办法_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:44:19
Original
1166 people have browsed it

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title></head><style> @font-face { font-family: Venera; font-weight: bold; src: url(Venera-900.otf); } p{ font-family:Venera; font-size:30px;}</style><body><p>10000</p></body></html>
Copy after login

 

你只需要将你网页中用到的字体放置到你的文件夹里面向引用图片一样去引用就就可以将字体加载进去,然后在设置字体类型的时候调用你设置的名字即可。

注:此种写法在谷歌和火狐下可以在ie8以下无效

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!