css 背景图+背景色渐变

1.由于采用rem计算,头部背景图自动适配时,某些机型下背景图底部会有细微的缝隙,造成背景色露底。所以采用背景图+背景色渐变方案。代码如下:

.plan-head{
    padding-left: 1rem;
    height:9.78rem;
    color: #fff;
    background: url(./images/[email protected]) no-repeat bottom / contain,linear-gradient(to bottom, #32D2FF 0%, #32D2FF 25%, #ffffff 75%,#ffffff 100%);
}

猜你喜欢

转载自blog.csdn.net/m0_37285193/article/details/113772113