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 C#读写EXCEL文件,不同编译
  • ¥15 如何提取csv文件中需要的列,将其整合为一篇完整文档,并进行jieba分词(语言-python)
  • ¥15 MapReduce结果输出到HBase,一直连接不上MySQL
  • ¥15 扩散模型sd.webui使用时报错“Nonetype”
  • ¥15 stm32流水灯+呼吸灯+外部中断按键
  • ¥15 将二维数组,按照假设的规定,如0/1/0 == "4",把对应列位置写成一个字符并打印输出该字符
  • ¥15 NX MCD仿真与博途通讯不了啥情况
  • ¥15 win11家庭中文版安装docker遇到Hyper-V启用失败解决办法整理
  • ¥15 gradio的web端页面格式不对的问题
  • ¥15 求大家看看Nonce如何配置