2010-03-18 58 views
0

我想设置一个背景画布,并在其上设置repeat-x。但是我尝试的任何东西都不起作用。我使用此代码:Flex中的背景重复3

<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> 

但它不会工作:(

什么是错的代码

回答

1

的风格标签使用background-Imagebackground-Repeat而是试图

你也应该确保图像可以访问或尝试嵌入图像

background-Image: Embed('../assets/images/header.png'); 
+0

现在我正在使用:background-Image:Embed('../ assets/images/header.png');背景 - 重复:x-repeat; 现在我看到的图像,但不是与100%宽度:( – Timo 2010-03-18 18:58:44

+1

检查出背景大小的属性 – Jason 2010-03-18 19:26:24

+0

没问题,它是为雅吗? – Jason 2010-03-18 19:38:37