我试图了解如何制作按钮的背景渐变。
我已经用谷歌搜索了它,并找到了一些工具,但它们并没有给我所需的结果。我看起来不像起源那么优雅。
这是我正在使用的工具:
http://www.colorzilla.com/gradient-editor/
我正在复制此页面上的按钮:
预期结果:
我有什么:
这是该工具建议的代码:
.btn-muestrasgratis, .btn-muestrasgratis:active, .btn-muestrasgratis:visited {
/* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#febf01+0,d66802+82;Yellow+Flat */
background: #febf01; /* Old browsers */
background: -moz-linear-gradient(top, #febf01 0%, #d66802 82%); /* FF3.6-15 */
background: -webkit-linear-gradient(top, #febf01 0%,#d66802 82%); /* Chrome10-25,Safari5.1-6 */
background: linear-gradient(to bottom, #febf01 0%,#d66802 82%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#febf01', endColorstr='#d66802',GradientType=0 ); /* IE6-9 */
}
更新 1:
它在使用标签时起作用,而不是使用按钮标签。
使用按钮标签时,底部有边框。它不像使用标签那么顺利。
我更喜欢使用按钮标签。
我不知道使用标签或按钮标签是否重要,因为它会将数据作为 django webapp 发送到服务器。
<div class="btn-group mr-4" role="group" aria-label="First group">
<button type="button" class="btn btn-comprar btn-xlarge text-white">Comprar</button>
</div>
<a href="#" class="btn-comprar">Shop now</a>


