无法显示Font-Awesome图标

时间:2015-09-03 06:10:23

标签: php html css wordpress fonts

因此,出于某种原因,Lineicons会显示字体真棒图标。

如果你打开菜单(你必须使你的窗口低于700px宽度) 您可以看到菜单图标打开菜单。下面我放置了以下代码

<li><a href="#" class="icon icon-user">Data Management</a></li>
<li><a href="#" class="fa-user">Location</a></li>

正如您所看到的那样,LineIcons的第一个图标正在显示,而Font-Awesome中的“fa-user”图标将不会显示。我不确定为什么我还必须在“icon-user”之前添加word图标,但这是让它工作的唯一方法。

以下是我正在测试它的页面:Here

4 个答案:

答案 0 :(得分:5)

你必须添加&#34; fa&#34;在fa-user面前

<li><a href="#" class="fa fa-user">Location</a></li>

这将解决您的显示问题。

答案 1 :(得分:3)

我总是建议使用加载CDN的版本。

下面:

<html>
<head>
   <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
</head>
<body>
    <h1>Icons:</h1>
    <ul>
        <li><i class="fa fa-user"></i> fa fa-user</li>
        <li><i class="fa fa-remove"></i> fa fa-remove</li>
    </ul>
</body>

答案 2 :(得分:0)

在他们的网站上,cdn没有https。尝试添加它!

答案 3 :(得分:0)

爵士不要使用bootstrapcdn使用这个希望这项工作

/*
 * Do your authentication logic here, log in user, etc.
 */

//Fist, check if we have any file sent to the script:
$file = isset($_FILES['file']) ? $_FILES['file'] : NULL;


//It seems we have a file?
$tmpfile = $file['tmp_name'];
//Find the file extension:
$fileparts = explode('.', $file['name']);

//Apply the extension, usually the last item in the parts array:
$fileExtension = $fileparts[count($fileparts) - 1];

//Make a filename:
$filename = md5($file['name']);

//add file extension to the filename:
$filename .= '.' . $fileExtension;

//Save to current directory:
$saveto = __DIR__ . DIRECTORY_SEPARATOR . $filename;

//Move file:
move_uploaded_file($tmpfile, $saveto);

///If we ever get here, the file has been uploaded, saved and moved to the permanent location
print 'File saved to: ' . $saveto;