In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article is about how to use the Flex style in Flex. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Use Flex style in Flex
Flex supports more Flex styles than Flash, and there are many ways to define Flex styles. This is also one of the places where Flex is more powerful than Flash and suitable for web development.
Flex style definition type
1. External Flex style sheet
Flex calls the global Flex stylesheet global.css, which is defined by flex-config.xml, such as:
/ WEB-INF/flex/global.cssglobal-css-url >
The system default Flex stylesheet file global.css file does not have any Flex style definition, we can manually add the global Flex style, or we can change the default global Flex style file path. For example, the global Flex style file should be:
/ css/styles.cssglobal-css-url >
Incidentally, there are four ways to define color Flex styles when defining external css files:
1:.myclass {fillColor:#6666CC} / / hexadecimal color format
2:.myclass {borderColor:rgb (77%, 22%, 0%)} / / RGB color format
3:.myclass {errorColor:rgb (0555)} / / decimal RGB color format
4:.myclass {color:Blue} / / VGA color name format
two。 Local Flex style definition
Use to define the Flex style of the current file
The following example defines the myFontStyle subclass Flex style. To use the corresponding Flex style, you can use the styleName property in the component to apply the Flex style.
1. 2..myFontStyle {fontSize:15} 3.mx:Style > 4.
The following Flex style defines the Flex style for all Button components, and Flex styles defined in this way do not need to specify a Flex style name when used.
1. 2.Button {fontSize:15} 3.mx:Style > 4.
3. Embedded Flex style definition
For individual components that require special handling, you can use the following ways to embed Flex style definitions
4. Use script Flex style definition
This method uses Flash's traditional AS scripting method to define Flex styles, which is more flexible, and can use the StyleManager class and the getStyle () and setStyle () methods, as follows:
1. 2. 10.mx:Script >
If the three Flex style definitions are used at the same time, the priority is as follows: embedded Flex style > local Flex style definition (script Flex style definition) > external Flex style definition
Special Flex style definition
When defining Flex styles, we need to pay attention to several special Flex style definitions of Flex
1. Global Flex style definition
Apply globalFlex style to all undefined control components
1.global {2.fontSize22; 3.textDecorationRelated underline; 4.}
two。 Application Flex style definition
The Application tag is the root tag of Flex, and the ApplicationFlex style is used to define the Flex style of undefined containers and child containers.
1.Application {2.marginal LeftVera 0px; 3.Margaret RightParade 0px; 4.Margaret TopVone 0px; 5.marginal Bottomize 0px; 6.marginal LignVOPX; 7.} Thank you for reading! This is the end of this article on "how to use Flex style in Flex". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.