简体   繁体   English

错误'缺少声明' - @import

[英]Error Missing 'Before Statement' - @import

I'm getting an error in Firebug Web Developer when loading my site: 加载我的网站时,我在Firebug Web Developer中收到错误:

Error: missing ; before statement
Source File: http://jquery-ui.googlecode.com/svn/tags/latest/themes/base/jquery.ui.all.css
Line: 10, Column: 1
Source Code:
@import "jquery.ui.base.css"; 

Here's that full file: 这是完整的文件:

/*!
 * jQuery UI CSS Framework 1.8.19
 *
 * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Theming
 */
@import "jquery.ui.base.css";
@import "jquery.ui.theme.css";

Any suggestions? 有什么建议么?

The only reason you would get JavaScript errors for a CSS file is if you are loading the CSS as JavaScript. 如果您将CSS加载为JavaScript,那么您获取CSS文件的JavaScript错误的唯一原因。

This may sound patronising, but are you maybe doing: 这可能听起来很光顾,但你可能会这样做:

<script src="jquery.ui.base.css"></script>

If so, it should be changed to: 如果是,则应更改为:

<link rel="stylesheet" href="jquery.ui.base.css" />

Of course, this is an easier mistake to make if you are using some jQuery import thing instead, but we'd need to see more of your source code to determine that. 当然,如果您使用某些jQuery导入内容,这是一个更容易犯的错误,但我们需要查看更多源代码来确定它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM