【问题标题】:Css bundling and Minification, css rule contains absolute urlscss捆绑和缩小,css规则包含绝对url
【发布时间】:2014-01-30 12:46:01
【问题描述】:

我已经定义了一些字体CSS 规则,它具有绝对网址,例如

@font-face {
    font-family: 'Oxygen';
    font-style: normal;
    font-weight: 700;
    src: local('Oxygen Bold'), local('Oxygen-Bold'), url(http://themes.googleusercontent.com/static/fonts/oxygen/v2/yVHpdQrmTj9Kax1tmFSx2j8E0i7KZn-EPnyo3HZu7kw.woff) format('woff');
}

但是当我使用绝对 URL 进行捆绑时。我遇到了 400 异常,因为它无法解析路径。

“NetworkError: 400 Bad Request - Something/Content/css/http:/themes.googleusercontent.com/static/fonts/oxygen/v2/RzoNiRR1p2Mqyyz2RwqSMw.woff”
RzoNiR...Mw.woff

【问题讨论】:

    标签: asp.net-mvc-4 bundling-and-minification


    【解决方案1】:

    您可能想要自定义CssRewriteUrlTransform 并忽略以https://http:// 开头的路径

    【讨论】:

      猜你喜欢
      • 2013-12-27
      • 1970-01-01
      • 2016-01-31
      • 1970-01-01
      • 1970-01-01
      • 2017-09-23
      • 2018-04-26
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多