How to set Flex style
This article mainly introduces how to set Flex style, with certain reference value, interested friends can refer to, I hope you have a lot of gains after reading this article, let Xiaobian take you to understand.
Set Flex Style
1. Use imported external styles:
1. Create a new style file (all.css):
Panel{ background-color:#00FF00; font-family:Geneva; } .lbl{ font-size:16px; color:#FF0000; }
2. Use import
Second, use imported external styles and use ". "Style
III. Use labels to set Flex styles
.lblStyle{ color:#0000FF; font-size:16px; }
IV. Use getStyle and setStyle to set: lblGet.setStyle("color","#FF0000");
5. StyleManner class is used to set Flex style:
varcs:CSSStyleDeclaration=newCSSStyleDeclaration(); cs.setStyle("color","#0000FF"); StyleManager.setStyleDeclaration("Text",cs,true); StyleManager.setStyleDeclaration(which type, style, whether to take effect immediately);
VI. Through global variables: golbal
vargolbarStyle:CSSStyleDeclaration=StyleManager.getStyleDeclaration("golbal")
ongoing operation
VII. Examples:
.lblStyle{ color:#0000FF; font-size:16px; } Thank you for reading this article carefully. I hope that the article "How to Set Flex Style" shared by Xiaobian will be helpful to everyone. At the same time, I hope that everyone will support you a lot and pay attention to the industry information channel. More relevant knowledge is waiting for you to learn!