【发布时间】:2013-05-14 00:00:12
【问题描述】:
我有一个 CSS 样式表,其中包含以下代码:
@charset "utf-8";
/* CSS Document */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video
{
margin: 0;
padding: 0;
border: 0;
vertical-align: baseline;
}
我正面临这些错误
/* 缩小失败。返回未缩小的内容。 (1189,1): 运行时错误 CSS1019: 意外的令牌,找到 '@charset' (1189,10): 运行时错误 CSS1019: Unexpected token, found '"utf-8"' (1189,17): 运行时错误 CSS1019: Unexpected token, found ';'
【问题讨论】:
-
也许 minifier 根本无法处理 @ 命令。如果没有它,只保存 CSS 文件怎么样,可能会抛出一个 UTF-8 BOM(尽管这不是必需的)。否则,也许this question 会有所帮助,这似乎可以处理类似的问题。
-
是的。您是否尝试过使用媒体查询规则?还有
@font-face?
标签: asp.net-mvc css stylesheet