本文摘自PHP中文网,作者不言,侵删。
本篇文章将给大家分享一个创建渐变颜色按钮的效果,内容很详细,有感兴趣的朋友可以看一看具体内容。话不多说,我们直接进入正题~
渐变按钮代码如下:
button-gradient.css(css文件)
1 2 3 4 5 | .gradientButton{
border : 1px solid #ff6a00 ;
width : 100px ; height : 28px ;
background :linear-gradient(to bottom , #fcffa2 , #fbb700 );
}
|
button-gradient.html(html文件)
1 2 3 4 5 6 7 8 9 10 11 12 | <!DOCTYPE html>
< html xmlns="
<head>
< meta http-equiv = "Content-Type" content = "text/html; charset=utf-8" />
< title ></ title >
< link rel = "stylesheet" type = "text/css" href = "button-gradient.css" />
</ head >
< body >
< div >< button type = "submit" class = "gradientButton" >Button</ button ></ div >
< hr />
</ body >
</ html >
|
渐变色按钮效果如下:

带图标的渐变按钮
此代码在渐变按钮上显示一个图标。
代码如下:
阅读剩余部分
相关阅读 >>
css实现渐变色按钮的效果(代码实例)
更多相关阅读请进入《渐变色按钮》频道 >>
人民邮电出版社
本书对 Vue.js 3 技术细节的分析非常可靠,对于需要深入理解 Vue.js 3 的用户会有很大的帮助。——尤雨溪,Vue.js作者
转载请注明出处:木庄网络博客 » CSS实现渐变色按钮的效果(代码实例)