gpt4 book ai didi

font-awesome - Font Awesome 5 图标未显示

转载 作者:行者123 更新时间:2023-12-02 05:40:21 28 4
gpt4 key购买 nike

我使用了 codeigniter 和 Font Awesome 5 我已经下载了 font awesome 5 的最新版本,但由于某种原因我的图标没有显示出来

Question How to get the icon to show up in font awesome 5 I am using xampp



它应该显示在登录文本旁边,开发控制台中没有错误

enter image description here
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title><?php echo $title;?></title>
<link rel="stylesheet" type="text/css" href="<?php echo base_url('assets/plugins/bs/css/bootstrap.css');?>">
<link rel="stylesheet" type="text/css" href="<?php echo base_url('assets/css/stylesheet.css');?>">
<link rel="stylesheet" type="text/css" href="<?php echo base_url('assets/plugins/fa/web-fonts-with-css/fontawesome-all.min.css');?>">
<script type="text/javascript" src="<?php echo base_url('assets/js/jquery-3.2.1.slim.min.js');?>"></script>
<script type="text/javascript" src="<?php echo base_url('assets/js/popper.min.js');?>"></script>
<script type="text/javascript" src="<?php echo base_url('assets/plugins/bs/js/bootstrap.js');?>"></script>
</head>
<body>

<div class="row mb-3">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-xs-12">
<a href="<?php echo base_url('login');?>" class="btn btn-dark"><i class="fas fa-sign-in-alt"></i> Sign in</a>
</div>
</div>

</body>
</html>

最佳答案

Font Awesome 网站上有关让 5.0.10 运行的说明在涉及哪些文件应该放在何处时有点令人困惑。我遇到了这个确切的问题并通过以下步骤解决了它:

  1. Create the following directory

    /static/styles/fontawesome/css

  2. Copy and paste all fontawesome css files into the above directory

  3. Copy the entire webfonts directory and paste in into /static/styles/fontawesome (so that it is at same level as the css directory)

  4. Add the following to your html header <link rel="stylesheet" href="static/styles/fontawesome/css/fontawesome-all.css">

  5. Add icon tags to your code using the corresponding version documentation (5.0.10)
    <i class="fas fa-tachometer-alt"></i>



注意:如果您没有专业版许可证,请务必仅使用免费集中的图标。
https://fontawesome.com/icons?d=gallery&m=free

这可能不适用于所有人,但希望它可以帮助某人解决这个令人沮丧的问题!

关于font-awesome - Font Awesome 5 图标未显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48941415/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com