Answer the question
In order to leave comments, you need to log in
Partial gradient for
There is an image tag
How to achieve such an effect using CSS / JS without editing the image itself?
Answer the question
In order to leave comments, you need to log in
Well, I can offer not the best option, rather even stupid.
put a layer with png (gradient with a transparent background) on top of the layer of this image.
CSS z-index and all.
a picture with a gradient of the width you need and a height of 1 pixel.
You repeat it along the y-axis.
You can create a translucent PNG with a gradient (or a whole range of such files) and overlay on top of the images marked with the desired class using JS tools when the page loads.
something like that
<div id="image">
<img src="0ff35a09.jpg" width="159px" height="110px" alt="qq" class="overlayme" />
<span class="overlayed"></span>
</div>
#image{
width: 159px;
height: 110px;
position:relative;
}
.overlayed{
display:block;
position:absolute;
top:0;
left:0;
width: 100%;
height:100%;
background: #FFF;
background: -moz-linear-gradient(left, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%); /* firefox */
background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255,255,255,1)), color-stop(100%, rgba(255,255,255,0))); /* webkit */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FFFFFFFF', endColorstr='#00FFFFFF',GradientType=0 ); /* ie */
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question