本文主要是介绍uniapp-css多颜色渐变:左右+上下,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
案例展示
案例代码:
代码灵感:使用伪类进行处理
<view class="headBox"></view>
.headBox {height: 200rpx;background: linear-gradient(to right, #D3D5F0, #F0DCF3, #F7F6FB, #DAE8F2, #E1D3EE);position: relative;
}.headBox::after {content: '';position: absolute;left: 0;bottom: 0;width:100%;height:100rpx;background:linear-gradient(to bottom, #ffffff00, #F8F8F8);
}
这篇关于uniapp-css多颜色渐变:左右+上下的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!