1.

How Do We Use Css Styles In Flex?

Answer»

EXTERNAL styles are defined in a separate FILE and can be used in any MXML file that references the CSS file. You reference a CSS file into an MXML file with the source property of the <MX:Style> tag, as FOLLOWS:

<mx:Style source="../siteStyles.css"/>

Embedded styles are defined in an MXML file and can only be used in that file. Embedded styles are defined with the <mx:Style> tag, as follows:

<mx:Style> 
.myclass { background-color: xFF0000 } 
TextInput { font-family: Helvetica; font-size: 12pt } 
</mx:Style>
<mx:Canvas>
<mx:Button styleName="myclass">
</mx:Canvas>
Inline styles are defined in an MXML tag and can only be used in that tag. Inline styles are defined as follows:

<mx:Button color="red"...>
<mx:TextInput FONTFAMILY="Helvetica" fontSize="12"...>

External styles are defined in a separate file and can be used in any MXML file that references the CSS file. You reference a CSS file into an MXML file with the source property of the <mx:Style> tag, as follows:

<mx:Style source="../siteStyles.css"/>

Embedded styles are defined in an MXML file and can only be used in that file. Embedded styles are defined with the <mx:Style> tag, as follows:

<mx:Style> 
.myclass { background-color: xFF0000 } 
TextInput { font-family: Helvetica; font-size: 12pt } 
</mx:Style>
<mx:Canvas>
<mx:Button styleName="myclass">
</mx:Canvas>
Inline styles are defined in an MXML tag and can only be used in that tag. Inline styles are defined as follows:

<mx:Button color="red"...>
<mx:TextInput fontFamily="Helvetica" fontSize="12"...>



Discussion

No Comment Found