我在使用 css 时遇到了一些问题

发布于 2024-10-21 06:14:54 字数 181 浏览 5 评论 0原文

我在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

倥絔 2024-10-28 06:14:54

在 Spark 中,某些组件与某些较旧的 mx 组件具有相同的名称。因此,adobe 在声明 CSS 样式时需要命名空间,如下所示:

<Style>
  @namespace mx "library://ns.adobe.com/flex/mx"; (mx components)
  @namespace s "library://ns.adobe.com/flex/spark"; (spark components)
</Style>

它位于 CSS 样式表的顶部。如果您查看您的在项目根目录中的代码中,您将看到类似以下内容:

<s:Application ... xmlns:s="library://ns.adobe.com/flex/spark" ...>

在这种情况下,您的 stylesheet.css 将需要以下内容:

@namespace s "library://ns.adobe.com/flex/spark";

希望这会有所帮助...

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:

<Style>
  @namespace mx "library://ns.adobe.com/flex/mx"; (mx components)
  @namespace s "library://ns.adobe.com/flex/spark"; (spark components)
</Style>

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:

<s:Application ... xmlns:s="library://ns.adobe.com/flex/spark" ...>

In this case, your stylesheet.css would need the following:

@namespace s "library://ns.adobe.com/flex/spark";

Hope this helps...

浅浅淡淡 2024-10-28 06:14:54

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.

埖埖迣鎅 2024-10-28 06:14:54

根据网站,将以下内容添加到您的 CSS 中应该会有所帮助:

    @namespace components “com.hillelcoren.components.*”;

    components|AutoComplete
    {
    selected-item-style-name: macMail;
    }

According to the site, adding something this to your CSS should help:

    @namespace components “com.hillelcoren.components.*”;

    components|AutoComplete
    {
    selected-item-style-name: macMail;
    }
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文