如何设置不透明度值,例如opacity: 0.6在线性渐变背景图像上?
background-image: linear-gradient(to left, #00497a -26.48%,#003366 73.52%);
Run Code Online (Sandbox Code Playgroud)
谢谢!
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)
| 归档时间: |
|
| 查看次数: |
13222 次 |
| 最近记录: |