您可以使用 2 层元素来实现此目的... jsfiddle https://jsfiddle.net/x0d5oLc4/
html
<div id="bfcontainer">
<div id="bluefade"></div>
<div id="whitefade"></div>
</div>
css
#bfcontainer {
position:relative;
}
#bluefade{
position:absolute;
z-index:1;
width:200px;
height:200px;
background: #1e5799; /* Old browsers */
background: -moz-linear-gradient(left, #1e5799 0%, #ffffff 49%, #1e5799 100%);
background: -webkit-linear-gradient(left, #1e5799 0%,#ffffff 49%,#1e5799 100%);
background: linear-gradient(to right, #1e5799 0%,#ffffff 49%,#1e5799 100%);
}
#whitefade{
display:block;
position:absolute;
z-index:2;
width:200px;
height:200px;
background: -moz-linear-gradient(top, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
background: -webkit-linear-gradient(top, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 100%);
background: linear-gradient(to bottom, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 100%);
}