G
G
graduate students @graduate2021-11-01 12:08:45
css
graduate students @graduate, 2021-11-01 12:08:45

How to fit an SVG block to a USE block in size?

In general, the SVG block is always larger than the USE block. I can't get the size right.
https://codepen.io/papagis/pen/XWaprKz

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
A person from Kazakhstan, 2021-11-02
students

Since your SVG is rectangular, it fits only in the side view mode, and in all other cases it pops out and saves us if we write this in .bbb. preserveAspectRatio="none" viewBox="0 0 24 24"
That is, like this:

<svg class="bbb" preserveAspectRatio="none" viewBox="0 0 24 24" style="max-height: 99vh;display: block; margin: auto;">
         <use xlink:href="#filtra1"  />
       </svg>

D
Dpy3b, 2021-11-01
@Dpy3b

.bbb {
  height: 100px;
  width: 100px;
};

And delete all the game that I wrote before

F
Froggyweb, 2021-11-01
@Froggyweb

<svg class="icon_userpic" viewBox="0 0 32 32">
svg:not(:root) {
    overflow: hidden;
}

You can see directly on this site

N
NetBear, 2015-01-30
@NetBear

- How many users do you need to emulate?
- What is the level of complexity of the website?
- What is the budget for building a platform for loading. testing?
- What is the level of training of the tester?
Take a look at this framework .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question