解决方案是将渐变嵌套在另一个具有边界半径和溢出的元素内。这不太理想,但它都是 CSS。没有黑客。
除此之外,使用背景图像非常适合 ie。
<div class="corner">
<div class="grad">button</div>
</div>
<style>
.corner,
.grad{
height:50px;
width:250px;
}
.corner{
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
overflow:hidden;
}
.grad{
border:1px #659300 solid;
background: #659300; /* old browsers */
background: -moz-linear-gradient(top, #659300 0%, #6F9B00 50%, #528200 51%, #6CA501 100%); /* firefox */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#659300), color-stop(50%,#6F9B00), color-stop(51%,#528200), color-stop(100%,#6CA501)); /* webkit */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#b1cc00', endColorstr='#518e00',GradientType=0 ); /* ie */
}
</style>