<?xml version="1.0" encoding="utf-8"?>
<!-- Simple example to demonstrate Spark BorderContainer component -->
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark">
<s:Panel title="BorderContainer Component Example"
width="75%" height="75%"
horizontalCenter="0" verticalCenter="0">
<s:BorderContainer
cornerRadius="10"
borderAlpha="0.8"
left="10" right="10" top="10" bottom="10">
<s:backgroundFill>
<s:SolidColor
color="#FF0000"
alpha="0.8"/>
</s:backgroundFill>
<!--设置边框笔触的属性,Color、weight-->
<s:borderStroke>
<s:SolidColorStroke
color="blue"
weight="4"/>
</s:borderStroke>
</s:BorderContainer>
</s:Panel>
</s:Application>
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark">
<s:VGroup gap="40" top="20" horizontalCenter="0">
<!--一般颜色填充-->
<s:BorderContainer
horizontalCenter="-1" top="0"
backgroundColor="#CCCCCC"
borderColor="#000000" borderWeight="3" width="447">
<s:Label text="A BorderContainer with styles"
fontSize="14" fontWeight="bold"
horizontalCenter="0" verticalCenter="0"/>
</s:BorderContainer>
<s:BorderContainer width="449"
borderColor="#000000"
borderWeight="4">
<!--填充发散的夜色-->
<s:backgroundFill>
<s:RadialGradient>
<s:entries>
<s:GradientEntry color="#FFFFFF"/>
<s:GradientEntry color="#999999"/>
</s:entries>
</s:RadialGradient>
</s:backgroundFill>
<s:Label text="A BorderContainer with a RadialGradient backgroundFill object"
fontSize="14" fontWeight="bold"
horizontalCenter="0"
verticalCenter="0"/>
</s:BorderContainer>
<s:BorderContainer width="447"
borderColor="#000000"
borderWeight="4">
<s:backgroundFill>
<!--填充线性颜色-->
<s:LinearGradient>
<s:entries>
<s:GradientEntry color="#FFFFFF"/>
<s:GradientEntry color="#999999"/>
</s:entries>
</s:LinearGradient>
</s:backgroundFill>
<s:Label text="A BorderContainer with a LinearGradient backgroundFill object"
fontSize="14" fontWeight="bold"
horizontalCenter="0"
verticalCenter="0"/>
</s:BorderContainer>
</s:VGroup>
</s:Application>
关于GradientEntry:
官方API:http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/graphics/GradientEntry.html
其他属性用法点击这里: