是否可以像旧的 Halo Button 一样设计 Spark Button 的样式? (仅使用 CSS)
我认为 Adobe 搞乱了我,从所有文档和教程来看,在 Flex 4 (Spark) 中设计一个简单的按钮样式似乎变得更加困难。我曾经能够让我的设计师创建 CSS,因为它与 Web 标准 CSS 相差不远。现在看来我需要先制作一个皮肤,如 这篇文章?
下面是旧的按钮样式。
Button {
fontFamily: "Arial, Helvetica";
fontWeight: bold;
fontSize: 11px;
paddingTop: 0px;
paddingBottom: 0px;
highlightAlphas: 0.42, 0.13;
fillAlphas: 1, 1, 1, 1;
fillColors: #B9DEF8, #9AC3EB, #B9DEF8, #9AC3EB;
color: #477199;
textRollOverColor: #477199;
textSelectedColor: #3399cc;
borderStyle: none;
}
谢谢!
I think Adobe are messing with me, from all the docs and tutorials it seems like styling a simple button got much more difficult in Flex 4 (Spark). I used to be able to have my designer create the CSS as it wasn't too far off from web standard CSS. Now it seems like I need to make a skin first as outlined in this post?
Below is the old button style.
Button {
fontFamily: "Arial, Helvetica";
fontWeight: bold;
fontSize: 11px;
paddingTop: 0px;
paddingBottom: 0px;
highlightAlphas: 0.42, 0.13;
fillAlphas: 1, 1, 1, 1;
fillColors: #B9DEF8, #9AC3EB, #B9DEF8, #9AC3EB;
color: #477199;
textRollOverColor: #477199;
textSelectedColor: #3399cc;
borderStyle: none;
}
thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Spark 按钮的外观是一种编程方法,您可以非常接近地模仿 Halo mx:button。
如果您只想让应用程序使用 Halo 主题,则可以使用 Halo 主题。
同样重要的是要注意 mx:Button 包含图标等内容,而 Spark Button 不包含这些内容。
正如您表示只想使用 CSS 一样,您必须深入了解 mx 皮肤类:
Spark theme:
Halo 主题:
基于您的 Spark CSS:
Skinning the Spark Button would be a programmatic approach to which you could mimic the Halo mx:button very closely.
If you just wanted your application to use the Halo theme, you could use Halo theme.
It's also important to note mx:Button included things like icon, which Spark Button does not.
As you denote you want to use CSS only, you'll have to dive in to mx skin class at:
Spark theme:
Halo theme:
Based upon your CSS for spark:
是的,这是可能的。
查看Spark 按钮上的样式< /a> 找出可以使用 CSS 修改的内容。
Yes, it is possible.
Check out the styles on the Spark Button to find out what can be modified using CSS.