以下以Group为例子讲述如何在Flex 4中填充背景颜色、图片:
1、图片填充方式:
1 <s:Group x="0" y="0" height="100%" width="100%"> 2 <s:Rect x="0" y="0" height="100%" width="100%"> 3 <s:fill> 4 <s:BitmapFill source="@Embed('../imges/myBg.jpg')"/> 5 </s:fill> 6 </s:Rect> 7 </s:Group>
2、渐变色填充方式:
1 <s:Rect alpha="0.5" x="0" y="0" width="100%" height="100%"> 2 <s:fill> 3 <s:LinearGradient rotation="250"> 4 <s:GradientEntry color="0x222222" ratio="0"/> 5 <s:GradientEntry color="0xdddddd" ratio="1"/> 6 </s:LinearGradient> 7 </s:fill> 8 </s:Rect>

浙公网安备 33010602011771号