Met twee div's bovenop mekaar lukt dat.
<style>
#sample-btn {
position: relative;
height: 200px;
width: 200px;
}
#sample-btn {
background-image: linear-gradient(bottom, rgb(255,0,0) 27%, rgb(255,255,0) 81%);
background-image: -o-linear-gradient(bottom, rgb(255,0,0) 27%, rgb(255,255,0) 81%);
background-image: -moz-linear-gradient(bottom, rgb(255,0,0) 27%, rgb(255,255,0) 81%);
background-image: -webkit-linear-gradient(bottom, rgb(255,0,0) 27%, rgb(255,255,0) 81%);
background-image: -ms-linear-gradient(bottom, rgb(255,0,0) 27%, rgb(255,255,0) 81%);
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0.27, rgb(255,0,0)),
color-stop(0.81, rgb(255,255,0))
);
}
.transparant {
position: absolute;
height: 100%;
width: 100%;
z-index: 10;
}
.transparant {
background-image: linear-gradient(left, rgba(255,255,255, 0.1) 11%, rgba(255,255, 255, 0.9) 95%);
background-image: -o-linear-gradient(left, rgba(255,255,255, 0.1) 11%, rgba(255,255, 255, 0.9) 95%);
background-image: -moz-linear-gradient(left, rgba(255,255,255, 0.1) 11%, rgba(255,255, 255, 0.9) 95%);
background-image: -webkit-linear-gradient(left, rgba(255,255,255, 0.1) 11%, rgba(255,255, 255, 0.9) 95%);
background-image: -ms-linear-gradient(left, rgba(255,255,255, 0.1) 11%, rgba(255,255, 255, 0.9) 95%);
background-image: -webkit-gradient(
linear,
left bottom,
right bottom,
color-stop(0.11, rgba(255,255,255, 0.1)),
color-stop(0.95, rgba(255,255, 255, 0.9))
);
}
</style>
<div id="sample-btn">
<div class="transparant">
Lorem ipsum ...
</div>
</div>
Wie een betere/gemakkelijkere oplossing heeft; gelieve die te delen