A
A
Andrey Beschastny2015-10-28 17:18:14
css
Andrey Beschastny, 2015-10-28 17:18:14

How to set a frame for a block with a Yandex map?

How to frame a Yandex map like this: https://yadi.sk/i/iQKB5mm4k5UHF ?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Pavel Radkov, 2015-10-29
@sarkazmoman

Position the picture with the mask on top of the block with the absolute map. It is better to make a picture svg - fewer kilobytes, smooth contours when scaling.
To make clicks pass through the image, set it to pointer-events: none.
Works almost everywhere caniuse.com/#feat=pointer-events
Where pointer-events doesn't work, don't make a mask. Detected through modernizr.
More examples paulradzkov.com/2012/pointer-events

D
Dmitry Skogorev, 2015-10-28
@EnterSandman

for example a div with your map to give css

border-radius: 50%;
width: 50%;
height: 100%;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question