White to transparent gradient with background image

后端 未结 2 1430
终归单人心
终归单人心 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 recommend Ultimate CSS Gradient Generator - ColorZilla.com

    It's a well designed tool and there's a white to transparent preset.

    The CSS code that it generates for a white to transparent gradient is this:

    background: -moz-linear-gradient(top, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%); /* FF3.6-15 */
    background: -webkit-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%); /* Chrome10-25,Safari5.1-6 */
    background: linear-gradient(to bottom, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#00ffffff',GradientType=0 ); /* IE6-9 */
    

提交回复
热议问题