B
B
byms2015-01-04 04:08:50
JavaScript
byms, 2015-01-04 04:08:50

How to draw a figure on the background of a div?

There is a div with a picture background, where there is white and black color. It is necessary to draw a figure on top of this div along the white borders. How can this be implemented?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Taratin, 2015-01-04
@Taraflex

Convert the image to svg and set the appropriate css for the shapes with white fill
jsfiddle.net/QW01_01/38tn072h

S
Sergey Ozeransky, 2015-01-04
@KREGI

What figure? It would be nice if you could show an example background image. The width of the border has a role, if so, on which border is the rendering?
My suggestion, at this stage, is a pixel-by-pixel search for a color in the image, we form an array of white color coordinates and then draw the desired shape.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question