仅应用于特定拐角的拐角半径
我有这个选项卡,我只想在右上角和左上角制作圆角。但最终它把四个角都圆了。
:
<mx:TabNavigator id="myTabNav" x="58" y="61" width="584" height="200" creationComplete="setColors(event)" styleName="myTabStyle">
<pages:One label="ThisOne" id="one" name="One"/>
<pages:Two label="Twoooooooooooh" id="two" width="584" name="two" />
<pages:Three label="Threeeeeeeeh" id="three" width="583" name="three" />
</mx:TabNavigator>
我做了什么
我的 pageStyles.css 文件是:
.myTabStyle {
tabStyleName: "myTabs";
corner-radius:15;
}
.myTabs {
backgroundColor: #FF0080;
corner-radius:10;
focusRoundedCorners: "tl tr";
skin:ClassReference('mx.skins.spark.ButtonSkin');
chromeColor: #FF0080; /* this is the tab widget itself, not the content */
border-style:outset;
}
如您所见,我有“focusRoundedCorners”指向右上角和左上角,但没有运气。我得到的是:
我做错了什么?
提前致谢。
I've this tabs that I wanted to make rounded only on top-right and top-left corners. But it ended up rounding all 4 corners.
What I did:
<mx:TabNavigator id="myTabNav" x="58" y="61" width="584" height="200" creationComplete="setColors(event)" styleName="myTabStyle">
<pages:One label="ThisOne" id="one" name="One"/>
<pages:Two label="Twoooooooooooh" id="two" width="584" name="two" />
<pages:Three label="Threeeeeeeeh" id="three" width="583" name="three" />
</mx:TabNavigator>
and
my pageStyles.css file is:
.myTabStyle {
tabStyleName: "myTabs";
corner-radius:15;
}
.myTabs {
backgroundColor: #FF0080;
corner-radius:10;
focusRoundedCorners: "tl tr";
skin:ClassReference('mx.skins.spark.ButtonSkin');
chromeColor: #FF0080; /* this is the tab widget itself, not the content */
border-style:outset;
}
As you can see I have the "focusRoundedCorners" to point to top-right and top-left but no luck. What I got is:
What am I doing wrong guys??
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看看这个工具http://www.wabysabi.com/flex/enhancedbuttonskin/
我猜想
focusRoundedCorners
的 focus 部分指的是当它仅具有焦点时应该如何。Have a look at this tool http://www.wabysabi.com/flex/enhancedbuttonskin/
I would guess that the focus part of the
focusRoundedCorners
refers to how it should be when it has focus only..所以这就是解决方案。
您可以编写自己的按钮皮肤或使用此处的按钮皮肤 http://www.wabysabi.com/flex/增强按钮皮肤/
命名为EnhancedButtonSkin.as(右键单击,查看源代码)。
然后声明您的 TabNavigator 组件并指定其 tabStyleName。
现在 css:
这个 css 将显示:
So here is the solution.
You can write you own button skin or use the one here http://www.wabysabi.com/flex/enhancedbuttonskin/
named EnhancedButtonSkin.as (right-click, View-Source).
Then declare your TabNavigator component and specify its tabStyleName.
And now the css:
This css will display: