Adding global CSS styles : CSS « Style « Flex

Home
Flex
1.Chart
2.Components
3.Container
4.Data Model
5.Development
6.Effects
7.Event
8.Graphics
9.Grid
10.Style
Flex » Style » CSSScreenshots 
Adding global CSS styles
         
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    
    <mx:Style>
        @namespace mx "http://www.adobe.com/2006/mxml";
        global 
        {
            fontFamily:'Arial';
            fontSize:12px;
            textDecoration: underline;
            fontWeight: bold;
            fontStyle: italic;
            backgroundColor: #66CC66;
        }
        mx|Application {
            textDecoration: underline;
            backgroundColor: #FFCCFF;         
            
        }
    </mx:Style>
    <mx:Panel title="This is a test"  width="261" height="178">
        <mx:Label text="This is a dummy text" />
    </mx:Panel>
    
</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.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:
28.The following example sets styles by using CSS on the Legend control:The following example sets styles by using CSS on the Legend control:
29.Apply style with CSSApply style with CSS
30.CSS style vs Control property style settingCSS style vs Control property style setting
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
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.