Jednostki w CSS (rem)

In this example below you will see how to do a Jednostki w CSS (rem) with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by wave_code, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright wave_code ©
  • HTML
  • CSS
  • JavaScript
    <section class="outer">
  <h1>Nagłówek zewnętrzny</h1>
  <p>Paragraf umieszczony w zewnętrznej sekcji.</p>
  <section class="inner">
      <h2>Nagłówek wewnętrzny</h2>
      <p>Paragraf umieszczony w wewnętrznej sekcji.</p>
  </section>
</section>

/*Downloaded from https://www.codeseek.co/wave_code/jednostki-w-css-rem-qrMzoa */
    html {
  font-size: 16px;
}

.outer {
  /* 1.5 * 16px = 24px */
  font-size: 1.5rem; 
}

.inner {
  /* 2 * 16px = 32px */
  font-size: 2rem;
}




/*Downloaded from https://www.codeseek.co/wave_code/jednostki-w-css-rem-qrMzoa */
    

Comments