In my Flex Application i'm using Main.mxml
sub.mxml
In Sub.mxml have code.
<mx:Label x="24" y="33" text="User ID"/>
<mx:Label x="24" y="59" text="Password"/>
And in my Main.Mxml file Writing CSS
mx|Label{
fontFamily: Calibri;
fontSize: 12;
color: #000000;
}
But Label not visiable ... is this Css wrong?
The code seems ok. This simple example works:
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<fx:Script>
<![CDATA[ import mx.events.FlexEvent; ]]>
</fx:Script>
<fx:Style>
@namespace mx "library://ns.adobe.com/flex/mx";
mx|Label {
fontFamily: Calibri;
fontSize: 12;
color: #000000;
}
</fx:Style>
<mx:VBox>
<mx:Label text="asdasdasd">
</mx:Label>
<mx:Label text="sdas">
</mx:Label>
</mx:VBox>
</s:Application>
Davide
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.