A
A
Adex2017-09-07 22:40:03
css
Adex, 2017-09-07 22:40:03

Why does SVG code offset html blocks?

The moment when I refreshed the page after adding the code turned out to be very unexpected and saw that the blocks had shifted down (well, or a place was added at the bottom if you paste the code at the end). In another layout, this problem did not arise. The code itself (pug)

svg(width="0" height="0")
      defs
        symbol#i-close-svg
          path(d="M64 0L0 64l448 448L2 958l64 64 446-446 446 446 64-64-446-446 448-448-64-64-448 448z")

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oku, 2017-09-08
@Oku

svg is a block element itself. And if the width itself is not specified in it, it occupies the entire area

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question