repeat Sfondo in Flex 3
-
20-09-2019 - |
Domanda
Sto cercando di impostare uno sfondo per una tela, e impostare un repeat-x su di esso. Ma tutto ciò cerco di non funzionano. Sto usando questo codice:
<mx:Style>
Canvas.topbar {
borderColor: yellow;
alpha: 1.0;
backgroundImage: url('../assets/images/header.png');
backgroundRepeat: x-repeat;
}
</mx:Style>
<mx:Canvas height="25" top="0" left="0" right="0" styleName="topbar">
<mx:Label x="2" y="4" text="{system_name} {system_version}" height="15"/>
</mx:Canvas>
Ma non funziona: (
Cosa c'è di sbagliato con il codice?
Soluzione
Provare a utilizzare background-Image
e background-Repeat
nel tag stile invece.
Si dovrebbe anche assicurarsi che l'immagine è accessibile o tenta incorporare l'immagine con
background-Image: Embed('../assets/images/header.png');
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow