A
A
Alexey Pomogaev2011-12-16 19:32:45
css
Alexey Pomogaev, 2011-12-16 19:32:45

Using CSS/JS to match an image with a solid background?

Of course, you can process each image in Photoshop / Gimp, make a gradient to the desired background color. But maybe with the help of CSS and/or JavaScript it is possible to smoothly blend the image with a solid background?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
avalak, 2011-12-16
@avalak

If I understand you correctly, you need something like this effect.
Dooper
Offhand, there are three obvious solutions:
- a script that will produce the finished image. Simple and effective.
- js/css box-shadow with inset. There are restrictions.
js/svg. Extremely limited use.

S
simplecode, 2011-12-16
@simplecode

test: http://www.colorzilla.com/gradient-editor/

S
Softlink, 2011-12-16
@Softlink

I recently wrote an article . The option is quite suitable for the picture.
Another way is to push the image into the background and apply a shadow with an inset as well.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question