EM Units Experiment
How do I make an em units experiment?
What is a em units experiment? How do you make a em units experiment? This script and codes were developed by Henri Peetsmann on 09 December 2022, Friday.
EM Units Experiment - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>EM Units Experiment</title> <link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="container"> <div class="row"> <div class="col-sm-6 col-sm-offset-3"> <div class="box"> <h3>EM units</h3> <p>This is a simple experiment with em units to show how they can be used with font-size and media queries to make a dynamic page.</p> <p>Basically font-size declaration is just used for the ratio and not the font-size itself.</p> <p>Go ahead and resize this viewport to see the effect.</p> </div> </div> </div>
</div>
</body>
</html>
EM Units Experiment - Script Codes CSS Codes
body { background: #ddd; padding-top: 35px;
}
.box { font-size: 20px; /* this will not be used to size text */ padding: 1em; border-top-right-radius: 1.5em; background: #fff;
} @media(min-width: 768px){ .box { font-size: 25px; }} @media(min-width: 992px){ .box { font-size: 35px; }} @media(min-width: 1200px){ .box { font-size: 45px; }}
h3 { font-size: 23px; padding: 0.6em 0 0.4em 0; margin-bottom: 0.75em; border-bottom: solid 0.3em indigo; text-transform: uppercase;
} @media(min-width: 768px){ h3 { font-size: 23px; }} @media(min-width: 992px){ h3 { font-size: 29px; }} @media(min-width: 1200px){ h3 { font-size: 32px; }}
p { font-size: 16px; /* I do not want to use em-s here */ line-height: 1.4; /* No need to use em-s here either */ margin-bottom: 1em;
}
Developer | Henri Peetsmann |
Username | henripeetsmann |
Uploaded | December 09, 2022 |
Rating | 3 |
Size | 1,921 Kb |
Views | 6,072 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Responsive SVG cross-browser | 2,078 Kb |
Dynamic ring loader | 3,331 Kb |
Modified Bootstrap dropdown | 2,534 Kb |
Responsive Moto G mockup | 3,415 Kb |
Sprite animation experiment | 1,638 Kb |
Centre aligned responsive header | 2,493 Kb |
Sponsor logos | 3,285 Kb |
Search box | 2,434 Kb |
Responsive MacBook retina mockup | 3,228 Kb |
A Pen by Henri Peetsmann | 3,559 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Loading animation - freedom purchase | Rocbear | 2,567 Kb |
Lazy Load for Background Images | The_ruther4d | 2,977 Kb |
Speech bubbles | Something | 1,547 Kb |
Classy Blockquote Styling | Andrewwright | 3,212 Kb |
Testimonial Fancy tabs responsive | Amit-webdesigner | 3,056 Kb |
Pure CSS Tooltips | Mobius1 | 2,271 Kb |
SVG Scalable Text | Said_FD | 1,451 Kb |
Drag and Drop Quiz | Cgspicer | 3,837 Kb |
Find The Penguin | Lelder | 2,212 Kb |
Slim Grid SASS SCSS v3.2 | Thesturs | 4,709 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!