Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-mvc/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css MVC5项目中缺少图标_Css_Asp.net Mvc_Asp.net Mvc 5_Summernote - Fatal编程技术网

Css MVC5项目中缺少图标

Css MVC5项目中缺少图标,css,asp.net-mvc,asp.net-mvc-5,summernote,Css,Asp.net Mvc,Asp.net Mvc 5,Summernote,我正在处理一个MVC5项目。我已经融入了这个项目。现在,您在上面的链接中看到的工具栏有一些图标。 当我运行我的项目时,它在本地运行得很好,但是当我部署它时,它找不到图标。因此,由于我不完全理解整个过程是如何工作的,我通过更改summernote-bs3.css和summernote.css中的路径来修复部署,但是本地版本当然坏了 我修改了为部署而修复它的方式: @font-face { font-family: 'Glyphicons Halflings'; src: url('~/Conten

我正在处理一个MVC5项目。我已经融入了这个项目。现在,您在上面的链接中看到的工具栏有一些图标。 当我运行我的项目时,它在本地运行得很好,但是当我部署它时,它找不到图标。因此,由于我不完全理解整个过程是如何工作的,我通过更改summernote-bs3.css和summernote.css中的路径来修复部署,但是本地版本当然坏了

我修改了为部署而修复它的方式:

@font-face {
font-family: 'Glyphicons Halflings';
src: url('~/Content/fonts/glyphicons-halflings-regular.eot');
src: url('~/Content/fonts/glyphicons-halflings-regular.eot?#iefix')     
format('embedded-opentype'), url('~/Content/fonts/glyphicons-     halflings-    
regular.woff') format('woff'), url('~/Content/fonts/glyphicons-halflings-
regular.ttf') format('truetype'), url  ('~/Content/fonts/glyphicons-
halflings-regular.svg#glyphicons_halflingsregular') format('svg');}
致:

请注意,我将~/Content/font/更改为。/Content/font/。我也为summernote.css做了同样的事情

原因是,在我的部署中,我看到有人试图下载:

但它找不到它,即使~的意思是家,实际上与此场景中的../相同

所以我不太确定如何解决这个问题。这些路径是如何工作的,或者从何处获取


感谢您的想法和帮助。

好的,经过几个小时的试用,我找到了字体/样式的路径是如何添加到网站URL的。在bundle.config中:

添加(新样式包(“~/插件”/summernoteStyles”)。包括(

上面以粗体显示的基础将添加到站点域的末尾。因此,我得到:

插件/font/glyphicons-halflings-regular.woff

为了修复它,我将bundle.config更改为如下所示:

添加(新样式包(“~/Content/plugins/summernote/summernoteStyles”)。包括(

也许有一天它会帮助别人

@font-face {
font-family: 'Glyphicons Halflings';
src: url('../Content/plugins/fonts/glyphicons-halflings-regular.eot');
src: url('../Content/pluginsfonts/glyphicons-halflings-regular.eot?#iefix') 
format('embedded-opentype'), url('../Content/plugins/fonts/glyphicons-
halflings-regular.woff') format('woff'), 
url('../Content/plugins/fonts/glyphicons-halflings-regular.ttf') 
format('truetype'), url('~/Content/fonts/glyphicons-halflings-
regular.svg#glyphicons_halflingsregular') format('svg');}