An Interest In:
Web News this Week
- May 1, 2024
- April 30, 2024
- April 29, 2024
- April 28, 2024
- April 27, 2024
- April 26, 2024
- April 25, 2024
November 6, 2018 02:51 pm GMT
Original Link: https://css-tricks.com/fun-tip-use-calc-to-change-the-height-of-a-hero-component/
Fun Tip: Use calc() to Change the Height of a Hero Component
The concept of Fluid Typography was tossed around a couple of years ago. The main idea is that if you know what size your font is at two different viewport sizes, then you can have the font scaling smoothly between the two sizes. We had a jQuery solution for this in FitText (meant of headings, of course) until the calc()
function was shipped giving us a pure CSS solution.
p {
…
font-size: calc(16px + (24 - 16)*(100vw - 400px)/(800 -
The post Fun Tip: Use calc() to Change the Height of a Hero Component appeared first on CSS-Tricks.
Original Link: https://css-tricks.com/fun-tip-use-calc-to-change-the-height-of-a-hero-component/
Share this article:
Tweet
View Full Article