线性渐变背景图像上的不透明度

ST8*_*T80 1 css

如何设置不透明度值,例如opacity: 0.6在线性渐变背景图像上?

background-image: linear-gradient(to left, #00497a -26.48%,#003366 73.52%);
Run Code Online (Sandbox Code Playgroud)

谢谢!

Rou*_*ica 8

hexidecimal color-codes用。。。来代替rgba color-codes

div {
width: 150px;
height: 150px;
background-image: linear-gradient(to left, rgba(0,67,116,0.6) -26.48%, rgba(0,51,102,0.6) 73.52%);
}
Run Code Online (Sandbox Code Playgroud)
<div>
</div>
Run Code Online (Sandbox Code Playgroud)