flex的背景重复
最近在做一个图片编辑器,想给app加个重复的背景,但flex又不支持像CSS的repeat,后来网上找到方法 分享给大家.
1.首先先下载 Degrafa.swc.
2.在你要加背景的地方加入CSS:
Application
{
background-image : Embed("assets/bg.png");
background-repeat: repeat;
borderSkin: ClassReference("com.degrafa.skins.CSSSkin");
}
3.F11
之后你就能在背景里看到重复平铺的指定图片了.
关于 degrafa :
Degrafa is a declarative graphics framework for Flex. Degrafa allows
you to use MXML markup to draw shapes, make complex graphics, create
skins and also includes advanced CSS support.
http://code.google.com/p/degrafa/downloads/list