我的一个css文件中有一个@import语句...我所有的css文件都是捆绑/缩小的,显然这是不合理的,因为我得到了一个错误:
run-time error CSS1019: Unexpected token, found '@import'导入的是来自Google的字体。在MVC4中正确处理CDN的方式是什么?
谢谢
发布于 2013-04-16 03:35:47
这是非常简单的.
在BundleConfig.cs中:
bundles.UseCdn = true;
// bundles code
var cdnPath = "path to your resource (font in my case)";
bundles.Add(new StyleBundle("~/fonts", cdnPath));然后在布局中
@Styles.Render("~/fonts")https://stackoverflow.com/questions/16022534
复制相似问题