twitter-bootstrap Bootstrap 自定义字体
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22966519/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Bootstrap custom fonts
提问by Bs3kg
I've been looking at the bootstrap custom fonts issues on here to find a solution for mine but it is still not working so I apologize for the repetition. Trying to get 'Museo Slab' into my page and its not working. Here's my code.
我一直在查看此处的 bootstrap 自定义字体问题以找到适合我的解决方案,但它仍然无法正常工作,因此我为重复道歉。试图将“Museo Slab”添加到我的页面中,但它不起作用。这是我的代码。
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
<link rel="stylesheet" type="text/css" href="css/style.css">
@font-face {
font-family: 'museo-slab';
src: url('fonts/Museo500-Regular.otf');
font-style: normal;
}
body {
font-size: 2em;
line-height: 18px;
font-family: 'museo-slab',arial,sans-serif;
line-height: 23px;
采纳答案by crafter
Check out the image for browser compatible font extensions. You have to use different extensions for different browsers. Here is the simple guide for it: http://css-tricks.com/snippets/css/using-font-face/
查看浏览器兼容字体扩展的图像。您必须为不同的浏览器使用不同的扩展程序。这是它的简单指南:http: //css-tricks.com/snippets/css/using-font-face/

