开发者

Flex: How to set border-width?

In Flex 4,开发者_如何学JAVA I have a canvas that I'd like to set border-width on via css. I can set the border color and border style, but the border width remains 1 pixel wide no matter what.

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
           xmlns:s="library://ns.adobe.com/flex/spark" 
           xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<fx:Style source="global.css" />

<mx:Canvas id="login_panel" width="300" height="200">
    <s:Label text="hi there"/>
</mx:Canvas>

global.css:

#login_panel {
border-weight:5px;
border-color:#00ff00;
border-style:solid;

}


have you tried border-thickness:5; ?


I believe your css is wrong. id="login_panel" should be styleName="login_panel" in your mxml. Then in your css #login_panel should be .login_panel.

Aside from that, you are using Flex 4 so you should use BorderContainer not Canvas.


Have you tried the CSS property border-width?

Check out this web page for more info:

http://www.w3schools.com/cssref/pr_border-width.asp

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜