MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Manual de usuario Pagina 36

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 124
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 35
TUTORIALS POINT
Simply Easy Learning Page 31
Flex Style With CSS
This chapter describes the styles under Adobe Flex:
F
lex supports the use of CSS syntax and styles to apply styles to its UI controls in the same way as CSS to
HTML components.
Way #1: Using external style sheet file
You can refer to a style sheet available in the class path of the application. For example consider Style.css file
in com/tutorialspoint/client folder where HelloWorld.mxml file also lies.
/* CSS file */
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";
...
.container {
cornerRadius :10;
horizontalCenter :0;
borderColor: #777777;
verticalCenter:0;
backgroundColor: #efefef;
}
Then css file can be referred by following code snippet
<fx:Style source="/com/tutorialspoint/client/Style.css"/>
Assign styles to UI component using styleName property
<s:BorderContainer width="500" height="500" id="mainContainer"
styleName="container">
...
</s:BorderContainer>
Way #2: Using styles within UI container component
CHAPTER
7
Vista de pagina 35
1 2 ... 31 32 33 34 35 36 37 38 39 40 41 ... 123 124

Comentarios a estos manuales

Sin comentarios