G
G
Georgy Kuznetsov2022-01-11 14:12:40
css
Georgy Kuznetsov, 2022-01-11 14:12:40

How to make all fonts on the page completely dependent on the window size?

Let's say there is such a snippet from the code (ignore the "classname", this code is from React):

<div className="header-main-lower">
         <h1 className=" "> Заголовок </h1>
         <p className=" "> Текст </p>
</div>


How do I write a CSS class so that both elements fully fit the size of the window? Options like using percentages, ems, and so on don't work.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
T
true, 2022-01-11
@RAFAILgaley

two options -
for each size, make your own style,
scale the content through transform scale

E
Evgeny Zapunny, 2022-01-11
@evgzap

indicate

<meta name="viewport" content="width=device-width, initial-scale=1.0">
in index.html
, and even better, indicate what needs to be done, what's the problem?

A
ambisinister One, 2022-01-11
@ambisinistrone

inherit

V
Vyach Gor, 2022-01-11
@sharnirio

what you need - link

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question