警告:组件的sparks.component.TextInput’不支持CSS类型选择器

前端之家收集整理的这篇文章主要介绍了警告:组件的sparks.component.TextInput’不支持CSS类型选择器前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在尝试做一个简单的CSS声明.但是,我上面有警告,不知道如何解决.我认为s |(类型)应该为我声明样式.
<fx:Style>
        @namespace s "library://ns.adobe.com/flex/spark";
        @namespace mx "library://ns.adobe.com/flex/mx";

        s|TextInput{
        color:#313131;
        }           
</fx:Style>

<s:Panel width="600" height="480" skinClass="skins.CustomPanel">
    <s:layout>
        <s:VerticalLayout paddingTop="7"/>
    </s:layout>
    <s:TextInput text="TextInput CSS not working"/>
    <mx:Form>
        <mx:FormHeading label="Please Enter The Information"/>
        <s:HGroup>
            <mx:FormItem>
                <s:Label text="Brand"/>
                <s:TextInput id="brand" text="CSS not working" width="156"/>
            </mx:FormItem>
    </mx:form>

解决方法

组件定义中不允许使用CSS类型选择器.

你有两个选择:

>改用类选择器>在顶级MXML文件中声明的css中移动Type选择器声明

原文链接:https://www.f2er.com/css/216287.html

猜你在找的CSS相关文章