White to transparent gradient with background image

后端 未结 2 1429
终归单人心
终归单人心 2021-02-02 09:13

I need to apply a white to transparent gradient which covers about a 1/4 of the top of the page and a background image visible for the rest of the page.

Im looking to ac

2条回答
  •  悲&欢浪女
    2021-02-02 09:42

    I prefer to use another tool for gradients generation - EnjoyCSS. It also allows to generate other CSS features like background, shadows, transitions etc.

    White to transparent gradient generated with this tool:

    background-image: -webkit-linear-gradient(-90deg, rgba(255,255,255,0) 0, rgba(255,255,255,1) 100%);
    background-image: -moz-linear-gradient(180deg, rgba(255,255,255,0) 0, rgba(255,255,255,1) 100%);
    background-image: linear-gradient(180deg, rgba(255,255,255,0) 0, rgba(255,255,255,1) 100%);
    background-position: 50% 50%;
    -webkit-background-origin: padding-box;
    background-origin: padding-box;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    -webkit-background-size: auto auto;
    background-size: auto auto;
    

提交回复
热议问题