当前第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标记。
效果如下:

以上就是CSS实现渐变色按钮的效果(代码实例)的详细内容,更多文章请关注木庄网络博客!
返回前面的内容
相关阅读 >>
css实现渐变色按钮的效果(代码实例)
更多相关阅读请进入《渐变色按钮》频道 >>
人民邮电出版社
本书对 Vue.js 3 技术细节的分析非常可靠,对于需要深入理解 Vue.js 3 的用户会有很大的帮助。——尤雨溪,Vue.js作者
转载请注明出处:木庄网络博客 » CSS实现渐变色按钮的效果(代码实例)