所以我正在尝试原型化营销页面,我正在使用Bootstrap和新的Font Awesome文件.问题是,当我尝试使用图标时,在页面上呈现的所有内容都是一个大方块.
这是我在头部包含文件的方式:
<head>
<title>Page Title</title>
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/bootstrap-responsive.css">
<link rel="stylesheet" href="css/font-awesome.css">
<link rel="stylesheet" href="css/app.css">
<!--[if IE 7]>
<link rel="stylesheet" href="css/font-awesome-ie7.min.css">
<![endif]-->
</head>
Run Code Online (Sandbox Code Playgroud)
以下是我尝试使用图标的示例:
<i class="icon-camera-retro"></i>
Run Code Online (Sandbox Code Playgroud)
但所有这一切都在一个大广场上呈现.有谁知道会发生什么?
我在我的项目中使用字体很棒(mvc/asp.net).我的问题是,我正在调试项目并检查localhost,字体真棒图标没有问题.但是当发布网站并在网上查看时,我看到了小盒子,而不是图标.我确定它放在正确的目录中(放置css文件的位置).
我找不到任何合适的解决方案.
顺便说一下按钮也没问题.它们都还可以,但图标消失了.
谢谢
我正在使用MVC4并通过nuget添加了Bootstrap和Font Awesome.
我可以看到Bootstrap如何捆绑在via BootstrapBundleConfig.cs(由nuget包添加)下面:
public static void RegisterBundles()
{
BundleTable.Bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include("~/Scripts/bootstrap*"));
BundleTable.Bundles.Add(new StyleBundle("~/Content/bootstrap").Include("~/Content/bootstrap.css", "~/Content/bootstrap-responsive.css"));
}
Run Code Online (Sandbox Code Playgroud)
我有以下问题:
<link href="~/Content/font-awesome.min.css" rel="stylesheet" />- 正确的方法是什么?Include("~/Content/bootstrap.css", "~/Content/bootstrap-responsive.css"))?