How to replace a picture on a gradient through CSS?

Hello! Got these classes in CSS, which is applied to the image gradient over text.
div.shadow-dialog { position:fixed;top:90px; left:0; width:100%; bottom:60%; z-index:2; }
div.shadow-dialog img { height:100%; position:absolute;top:0; left:0;width:100%;}

She is called in the html so
<div class="shadow-dialog"><img alt src="img/shadow.png"></div>

Instead of images use a gradient created using pure CSS? The gradient from white opaque to transparent white.
September 26th 19 at 06:59
3 answers
September 26th 19 at 07:01
1. In the browser (this is the program through which You access the Internet) open a page google.com (at the top of the browser window there is a field to enter the address of the page You want to open).
2. In the input field (in the middle of the opened page) enter the phrase "How to replace a picture on a gradient through CSS?".
3. Now click the "Google Search". You should see a list of pages where You'll find the answers to Your question.
there's an easier way =))
lmgtfy.com/?q=css+%D0%B3%D1%80%D0%B0%D0%B4%D0%B8%D... - Brain.MacGyver commented on September 26th 19 at 07:04
Hell, I didn't :D - Susan_Schmeler commented on September 26th 19 at 07:07
the ancient thing actually =)) - Brain.MacGyver commented on September 26th 19 at 07:10
but here with the soul, let me look in Google for you a bit tired of it :) - tanner_Wintheis commented on September 26th 19 at 07:13
come on you xD - nasir_Fisher commented on September 26th 19 at 07:16
September 26th 19 at 07:03
.gradient {
 background: -moz-linear-gradient(top, transparent 0%, #ffffff 100%);
 background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, transparent), color-stop(100%, #ffffff));
 background: -webkit-linear-gradient(top, transparent 0%, #ffffff 100%);
 background: -o-linear-gradient(top, transparent 0%, #ffffff 100%);
 background: -ms-linear-gradient(top, transparent 0%, #ffffff 100%);
 background: linear-gradient(top, transparent 0%, #ffffff 100%);
}
Thank you very much! Only the gradient is displayed like this imgur.com/317f6Kb what could be the problem? White background - Brain.MacGyver commented on September 26th 19 at 07:06
Not clear on screen to be honest... You make instead of the img div. Styles leave are the same as those for the img was, and just add more to what I wrote. If again something is wrong. Put the code to the thread, or screen normal, and then you have drained everything and it is not clear... - Susan_Schmeler commented on September 26th 19 at 07:09
All thanks, already understood ;-) - Brain.MacGyver commented on September 26th 19 at 07:12
Well, wonderful =) - tanner_Wintheis commented on September 26th 19 at 07:15
September 26th 19 at 07:05

Find more questions by tags HTML