我在使用 css 时遇到了一些问题
我在 css 中不断收到此警告:
Type 'AutoComplete' in CSS selector 'AutoComplete' must be qualified with a namespace.
我似乎无法修复它。有什么想法吗?我尝试过添加命名空间,但没有成功。 :S
I keep getting this warning in css:
Type 'AutoComplete' in CSS selector 'AutoComplete' must be qualified with a namespace.
I can't seem to get it fixed. Any ideas? I've tried adding namespaces but no go. :S
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在 Spark 中,某些组件与某些较旧的 mx 组件具有相同的名称。因此,adobe 在声明 CSS 样式时需要命名空间,如下所示:
它位于 CSS 样式表的顶部。如果您查看您的在项目根目录中的代码中,您将看到类似以下内容:
在这种情况下,您的 stylesheet.css 将需要以下内容:
希望这会有所帮助...
In Spark, some of the components have the same names as some of the older mx components. For this reason, adobe requires namespaces when declaring CSS Styles, like the following:
This goes in the top of your CSS stylesheet. If you look at your <Application> code in the root of your project, you will see something like the following:
In this case, your stylesheet.css would need the following:
Hope this helps...
CSS 文件中的组件必须指定其名称空间。 CSS 文件的顶部应类似于:
@namespace mx "library://ns.adobe.com/flex/mx";
您的 AutoComplete 的 CSS 声明应如下所示:
mx|Form{
//一些样式的东西
。
分别用 AutoComplete 及其命名空间替换 mx 和 Form
Components in the CSS file must have their namespace specified. At the top of the CSS file should be something like:
@namespace mx "library://ns.adobe.com/flex/mx";
And your CSS declaration for the AutoComplete from should look something like this:
mx|Form{
//Some style stuff
}
Substitute mx and Form with AutoComplete and its namespace respectively.
根据网站,将以下内容添加到您的 CSS 中应该会有所帮助:
According to the site, adding something this to your CSS should help: