我正在尝试做一个简单的 CSS 声明。但是,我收到了上面的警告,不知道如何解决。我认为 s|(type) 应该为我声明样式。
<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 中
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)