CSS style vs Control property style setting : CSS « Style « Flex






CSS style vs Control property style setting

CSS style vs Control property style setting
         
<?xml version="1.0" encoding="utf-8"?>
<mx:Application 
    xmlns:mx="http://www.adobe.com/2006/mxml" 
    layout="vertical">
    
    <mx:Style>
        .customTextInput {
           borderStyle: inset;
           borderColor: #ff0000;
           backgroundColor: #ffff99;
           color: #cc0000;
           textAlign: center;
           letterSpacing: 5;
           fontSize: 24;
           fontWeight: bold;
           fontStyle: italic;
        }
    </mx:Style>
    
    <mx:TextInput 
        styleName="customTextInput" 
        width="200"
        text="Value One" />
    
    <mx:TextInput 
        borderStyle="inset"
        borderColor="#FF0000"
        color="#CC0000"
        textAlign="center"
        letterSpacing="5"
        fontSize="24"
        fontWeight="bold"
        fontStyle="italic"
        width="200"
        text="Value Two"  />
    
</mx:Application>

   
    
    
    
    
    
    
    
    
  








Related examples in the same category

1.CSS InlineCSS Inline
2.CSS Style TagCSS Style Tag
3.CSS like StylesCSS like Styles
4.Styles with NamespaceStyles with Namespace
5.Flex CSS: class definitions that work the same way as HTML CSSFlex CSS: class definitions that work the same way as HTML CSS
6.Using CSS to apply graphical skinsUsing CSS to apply graphical skins
7.Apply dropShadowEnabled to CSSApply dropShadowEnabled to CSS
8.CSS over writeCSS over write
9.Add CSS for ApplicationAdd CSS for Application
10.CSS class with namespace and without namespaceCSS class with namespace and without namespace
11.Changing CSS SelectorsChanging CSS Selectors
12.CSS Type SelectorCSS Type Selector
13.Embeds an image in CSSEmbeds an image in CSS
14.Define the mySize variable and uses it in the CSSDefine the mySize variable and uses it in the CSS
15.To specify an Array for the fills property in CSS, you use a comma-separated listTo specify an Array for the fills property in CSS, you use a comma-separated list
16.Show how to use CSS class selectors to set the labelPosition and other properties that affect the appearance of data labels in a chartShow how to use CSS class selectors to set the labelPosition and other properties that affect the appearance of data labels in a chart
17.Two Spark Button controls inherit the styles of the Group descendant selectorTwo Spark Button controls inherit the styles of the Group descendant selector
18.Using Spark namespace for the Button components and the MX namespace for the Box containersUsing Spark namespace for the Button components and the MX namespace for the Box containers
19.Using 9-slice propertiesUsing 9-slice properties
20.Default unit is pixelsDefault unit is pixels
21.Numeric Format Color ValueNumeric Format Color Value
22.Color Format InlineColor Format Inline
23.CamelCase vs hyphenCamelCase vs hyphen
24.Use tag, set the styles using CSS syntaxUse <mx:Style> tag, set the styles using CSS syntax
25.CSS hexadecimal format for CSS style definitions and tag supportCSS hexadecimal format for CSS style definitions and <mx:Style> tag support
26.Loading style sheets defined in CSS at run timeLoading style sheets defined in CSS at run time
27.Adding global CSS styles
28.When you use the tag, you set the styles by using CSS syntax or a reference to an external file that contains style declarations, as the following example shows:When you use the <fx:Style> tag, you set the styles by using CSS syntax or a reference to an external file that contains style declarations, as the following example shows:
29.The following example sets styles by using CSS on the Legend control:The following example sets styles by using CSS on the Legend control:
30.Apply style with CSSApply style with CSS
31.Use CSS to Style ComponentsUse CSS to Style Components
32.Embed Styles by Using CSSEmbed Styles by Using CSS
33.Change CSS style at runtimeChange CSS style at runtime
34.TextInput CSS styleTextInput CSS style
35.CSS style by IDCSS style by ID