开发者

Background repeat in Flex 3

开发者 https://www.devze.com 2022-12-24 11:47 出处:网络
I am trying to set a background to a canvas, and set an repeat-x on it. But anything I try don\'t work. I am using this code:

I am trying to set a background to a canvas, and set an repeat-x on it. But anything I try don't work. I am using this code:

<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="topb开发者_开发百科ar">
    <mx:Label x="2" y="4" text="{system_name} {system_version}" height="15"/>
</mx:Canvas>

But it won't work:(

What is wrong with the code?


Try using background-Image and background-Repeat in the style tag instead.

You should also make sure the image is accessible or try embedding the image with

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

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号