如何在 Flex 3 中在我们想要的形状(如圆形、星形)上创建按钮?
我想将按钮的形状自定义为不同的形状,如圆形、星形、方形或任何形状。我怎样才能做到这一点?
I would like to customize the shape of the button to different shapes like circle, star, square or of any shape. How would i achieve so?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我很抱歉,因为这不能回答您的问题,但是:
为了确保用户可以可靠地单击您的按钮,您可能希望它是凸形的。矩形或圆形都可以,你可以在上面画一颗星星。但是您不希望用户尝试单击您的星星并错过,只是因为他们没有完全位于其手臂之一内。
I apologize because this doesn't answer your question, but:
In order to make sure the user can reliably click on your button, you probably want it to be a convex shape. A rectangle or circle is fine, and you could paint a star on it. But you wouldn't want the user to try to click your star and miss, just because they were not quite inside one of its arms.
画布可以用作按钮。
取一块所需尺寸的画布。将您所需的按钮形状(图像)作为画布的背景图像。
例子:
说明:{nextYellowButton} 是嵌入按钮。这是一个箭头形状的按钮。
这是一个 .PNG 图像。因此,它不包括背景颜色。
现在你的按钮是箭头形状的。它在屏幕上占据 50px * 50px 的区域。但它看起来就像一个箭头标记。
Canvas can be used as button.
Take a canvas of required size. Give your required button shape(image) as background image to canvas.
Example:
Explanation: {nextYellowButton} is the embedded button. It is an arrow mark shape button.
It is a .PNG image. So, it doesn't include the background color.
Now your button is of arrow shape. it occupies 50px * 50px area on screen. But it looks exactly like an arrow mark.