A
A
alexlol132019-06-11 19:00:53
css
alexlol13, 2019-06-11 19:00:53

How can I make the stroke be drawn to the inside, and not from the center of the line?

How to make the stroke be drawn to the inside of the line/polygon, and not from the center of the line to both sides?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Egor Antropov, 2019-06-11
@Relow

.clue {
    background: blue; /* Фоновый рисунок */
    outline: 2px dashed white; /* Пунктирная рамка */
    outline-offset: -10px; /* Выводим рамку внутри элемента */
    padding: 10px; /* Поля */
    min-height: 100px; /* Минимальная высота */
   }

So?

F
forspamonly2, 2019-06-12
@forspamonly2

no way. The stroke-alignment property found in the specification drafts is not supported by anyone at all, in the recent svg2 standard it seems not to exist.
The way around this is to put the path in the definitions section and draw the shape with twice the stroke width on that path and with the same path as the mask or clip-path.
here are two identical hearts: on the bottom with a regular black stroke, and on top of it with a white stroke inside the outline, made in this way:
people are also perverted with the outline-offset css property, but everything is bad with it with cross-browser compatibility.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question