【发布时间】:2013-09-13 14:42:25
【问题描述】:
我们正在为我们的 mvc 项目使用盒式磁带捆绑。我们遇到了一个问题,当我们将网站推送到我们的开发服务器时,某些字体文件没有进入cassette.axd。生成的样式表显示了到cassette.axd 中字体文件的链接,但是当我们尝试提取实际的url 时,我们得到一个404。所以我没有包含字体,而是试图看看我们是否可以从cassette 中排除字体文件夹缩小。结构是..
Root
|Content
|css
|styles.css
|font
styles.css 中包含以下内容...
@font-face {
font-family: 'latolight_italic';
src: url('../font/lato-lightitalic-webfont.eot');
src: url('../font/lato-lightitalic-webfont.eot?#iefix') format('embedded-opentype'),
url('../font/lato-lightitalic-webfont.woff') format('woff'),
url('../font/lato-lightitalic-webfont.ttf') format('truetype'),
url('../font/lato-lightitalic-webfont.svg#latolight_italic') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'latoregular';
src: url('../font/lato-regular-webfont.eot');
src: url('../font/lato-regular-webfont.eot?#iefix') format('embedded-opentype'),
url('../font/lato-regular-webfont.woff') format('woff'),
url('../font/lato-regular-webfont.ttf') format('truetype'),
url('../font/lato-regular-webfont.svg#latoregular') format('svg');
font-weight: normal;
font-style: normal;
}
在从盒式磁带生成的 styles.css 中,对字体的引用类似于...
src: url('/newdesign/cassette.axd/file/Content/font/lato-regular-webfont-5daaab4d79c85c0ac9f932c4848f08f673f3e6c4.eot'
有没有办法可以排除字体文件夹,让css文件中的src继续指向字体文件夹而不是卡带结果?
【问题讨论】:
标签: cassette