Get the App
SLTechnology News&Howtos  ›  Development  › 

Detailed explanation of the style of applying CSS in Flex3

Shulou Source: shulou.com Published: 2022-06-03 12:31:57 10月03日 Update

The main content of this article is "detailed explanation of the style of applying CSS in Flex3". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn "the detailed explanation of the style of applying CSS in Flex3".

Using style methods in Flex3

First, use local style definition

Use tags to create local style definitions in the MXML file. This tag contains a stylesheet definition that conforms to CSS2.0 syntax. These definitions apply to the current document and to subdocuments of the current document.

.solidBorder {/ / Class selection style border-style:solid;} button {/ / component definition style border-style:solid;}.... / / button applied to components / / documents automatically applies styles from stylesheets

Second, use external style sheets

Flex3 supports external CSS stylesheets. To apply a stylesheet to the current document and subdocuments, use the source attribute in the tag.

/ / load an external style sheet.

The style sheet definition in the style.css file is the same as the local style definition.

Third, use inline style

You can set style attributes in the MXML tag just as you set the properties of the component. Inline styles take precedence over local and external styles.

/ / set style properties

Use the setStyle () method

You can use methods in ActionScript to manipulate the style properties of a component. The priority of using the setStyle () method is * *.

/ / call to set the style when the component is initialized. I believe you have a deeper understanding of the "detailed explanation of the style of applying CSS in Flex3". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Style application document property method component tag priority content file learning practical deeper same usage interest practicality practical simple operation tone Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi NVidia Shulou Technology Linux Apple