php怎么做一个圆形按钮,超酷的圆形按钮制作

超酷的圆形按钮制作

2009-09-17

Start by drawing in a colored background. I've used dark brown/greys here and used a subtle radial gradient. Then in a new layer, draw a circle and fill it with a color. It doesn't matter what color you use; I've used green here.

6f526f37599c8d018b72367608bed50f.png

Next we are going to apply some layer styles. We're using two types of Inner Shadow (one using Inner shadow and one using Inner glow). Also we have a subtle Gradient Overlay and a Drop Shadow and a bit of Satin. I've chosen these to try to make the object look 3D by using shadows at the edges curving away and a radial gradient to make it look like light is hitting the middle. The satin is just to add a bit of extra something!

Anyhow, rather than going through the exact settings, just download the source and right-click the layer to Copy Layer Style.

0c54585a1cd2d207926627547e51a078.png

This is what the circle looks like with the layer style applied, kind of cool!

c5647c8fd4a8f35cf2411202973ce885.png

Next using the Circular Selection Tool, we draw an ellipse which is longer horizontally than it is vertically (as shown). Create a new layer and draw a radial gradient from white to transparent in it. Note that you want to drag the gradient so that total transparency occurs outside of the selection (i.e. the white part has a bit of a sharp cut off when the selection area ends).

When you're done, rotate the ellipse by about 30 degrees. This is our main highlight.

c0cb1ac6a1f5a154e37cb14db2ffd9b1.png

Now duplicate the highlight layer. Switch the first one's visibility off for a moment so you can see what you're doing, and then hold down Ctrl and click on the second highlight layer to select its pixels. Then hit the down and left arrows a few times and press delete. This should leave you with a thin bit of highlight (as shown).

0bc249c2a4b50c85c315d7fc0e12097d.png

Switch your first highlight layer back on. Then duplicate the second highlight and rotate it down the bottom left as shown. And now you have your button style!

fb252895249795b2df8142087bf51106.png

So next we want to make the button interchangeable. To do that, we simply get the main green layer and set the Fill to 0%

Fill is a bit like Opacity except that if you make something 0% Opacity then you make the layer styles transparent too, whereas if you make it 0% Fill, the layer styles are still visible. This is perfect for us because we get rid of the green, but still have everything we need to make our buttons. Now all we need to do is slot something underneath.

db9ae0fdfa329d738da52d911c5ad296.png

So I grabbed a British flag and you can see it here underneath the button and how the 0% Fill is working.

1f00e5e2dec1e793899a95846f4ade5e.png

All you need to do is hit Ctrl and click on the circle layer to select that sized circle, then press Shift+Ctrl+I to invert the selection, go to the flag layer, and hit delete. And you're done! One button!

d18ec4170dfda35f7edec7a8ebb372dd.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值