CSS实现渐变色按钮的效果(代码实例)


当前第2页 返回上一页

image-button-gradient.css(css文件)

1

2

3

4

5

6

7

8

9

10

11

12

13

#buttonImage {

  background-image:url('/img/search.png'); 

  display:inline-block

  margin-top:2px

  width:16px

  height:16px;

}

.flatbutton{

  border:1px solid #3079ed

  width:100px

  height:28px

  background:linear-gradient(to bottom, #9bcfff,#4683ea);

}

image-button-gradient.html(HTML文件)

1

2

3

4

5

6

7

8

9

10

11

<!DOCTYPE html>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

  <title></title>

  <link rel="stylesheet" type="text/css" href="image-button-gradient.css" />

  </head>

  <body>

  <button class="flatbutton"><span id="buttonImage"></span></button>

  </body>

  </html>

说明:它与前一个字符串标题的渐变按钮几乎相同。为了显示图像,在按钮标记中描述了span标记。

效果如下:

360截图20181109172309679.jpg

以上就是CSS实现渐变色按钮的效果(代码实例)的详细内容,更多文章请关注木庄网络博客

返回前面的内容

相关阅读 >>

css实现渐变色按钮的效果(代码实例)

更多相关阅读请进入《渐变色按钮》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...