douma5954 2015-10-15 12:25
浏览 59
已采纳

PHP模板和bootstrap字体很棒

i been work on php Template (.dwt.php) and in the header i put fontawsome css but the font awesome not work whatever i do i try change fonts paths and its not work here code of the php template

<?php 
require "header.php";
if(!$_SESSION['UserAssoc']['Administrator']) Redirect("home.php", "Insufficient Privileges");
?>
<!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" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>NOMS</title>
<!-- TemplateEndEditable --><!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
<link href="css/bootstrap.css" rel="stylesheet" media="screen" />
<link href="css/thin-admin.css" rel="stylesheet" media="screen" />
<link href="css/font-awesome.css" rel="stylesheet" media="screen" />
<link href="css/style.css" rel="stylesheet" />
<link href="css/dashboard.css" rel="stylesheet" />
<script src="Scripts/jquery.js"></script> 
<script src="Scripts/bootstrap.min.js"></script> 
<script type="text/javascript" src="Scripts/smooth-sliding-menu.js"></script> 
</head> 

and here my fontawsome.css file

@font-face {
    font-family: 'FontAwesome';
    src: url('../font/fontawesome-webfont.eot?v=3.2.1');
    src: url('../font/fontawesome-webfont.eot?#iefix&v=3.2.1') format('embedded-opentype'), 
    url('../font/fontawesome-webfont.woff?v=3.2.1') format('woff'), 
    url('../font/fontawesome-webfont.ttf?v=3.2.1') format('truetype'), 
    url('../font/fontawesome-webfont.svg#fontawesomeregular?v=3.2.1') format('svg');
    font-weight: normal;
    font-style: normal;
}

and i have all this fonts in folder called fonts and the fontawsome.css in the css folder can anyone please help?

  • 写回答

1条回答 默认 最新

  • dongtou9934 2015-10-15 12:27
    关注

    You don't need to load FontAwesome like that; you can just use the stylesheet. Don't need to use fontface:

    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 用ns3仿真出5G核心网网元
  • ¥15 matlab答疑 关于海上风电的爬坡事件检测
  • ¥88 python部署量化回测异常问题
  • ¥30 酬劳2w元求合作写文章
  • ¥15 在现有系统基础上增加功能
  • ¥15 远程桌面文档内容复制粘贴,格式会变化
  • ¥15 关于#java#的问题:找一份能快速看完mooc视频的代码
  • ¥15 这种微信登录授权 谁可以做啊
  • ¥15 请问我该如何添加自己的数据去运行蚁群算法代码
  • ¥20 用HslCommunication 连接欧姆龙 plc有时会连接失败。报异常为“未知错误”