CSS Transforms Test
How do I make an css transforms test?
Just a Simple CSS Transformations. What is a css transforms test? How do you make a css transforms test? This script and codes were developed by Maxim Konoval on 16 September 2022, Friday.
CSS Transforms Test - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>CSS Transforms Test</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <main> <div class="wrapper"> <p>Some Header</p> <div class="line_1 line"></div> <span>Some text</span> </div> <div class="wrapper"> <p>Some Header</p> <div class="line_2 line"></div> <div class="line_2-1 line"></div> </div> <div class="wrapper"> <div class="list_trigger"> <p>Some Header</p> <div class="arrow"></div> </div> <ul class="list"> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> <li>Item 4</li> <li>Item 5</li> <li>Item 6</li> </ul> </div>
</main> <script src="js/index.js"></script>
</body>
</html>
CSS Transforms Test - Script Codes CSS Codes
* { margin: 0; padding: 0; box-sizing: border-box;
}
main { display: flex; flex-flow: row wrap; justify-content: space-around; align-items: flex-start; padding-top: 50px;
}
.wrapper { position: relative; width: 200px; min-height: 40px; overflow-x: hidden;
}
/* First block */
.wrapper:hover .line_1 { transform: translateX(80%);
}
.wrapper:hover span { transform: translateX(75%); opacity: 0;
}
.line { position: absolute; top: 24px; width: 100%; height: 8px; background-color: #000;
}
.line_1 { left: -80%; transition: all .5s;
}
span { display: block; padding-top: 1px; padding-left: 25%; opacity: 1; font-size: .9rem; transition: all .5s;
}
/* Second block */
.wrapper:nth-child(2){ text-align: center;
}
.wrapper:hover .line_2 { transform: translateX(100%) scaleX(0);
}
.wrapper:hover .line_2-1 { transform: translateX(150%);
}
.line_2 { left: 0; transform-origin: right; transition: all 1s;
}
.line_2-1 { left: -150%; transition: all 1s;
}
/* Third block */
.list_trigger { position: relative; text-align: center;
}
.arrow { position: absolute; top: 1px; right: 30px; width: 0; height: 0; transform: rotate(-45deg); transform-origin: center; transition: all .5s; border: 10px solid #000; border-top-width: 0; border-right-color: transparent; border-bottom-color: #000; border-left-width: 0;
}
.arrow.rotate { transform: translateY(5px) rotate(135deg);
}
.list { margin-top: 10px; padding: 10px 0; opacity: 0; transform: scaleY(0); transform-origin: top; transition: .5s; background-color: #ccc;
}
.list.is-visible { opacity: 1; transform: scaleY(1);
}
li { padding: 10px; list-style: none;
}
CSS Transforms Test - Script Codes JS Codes
var screen = document.querySelector('main');
var listTrigger = document.querySelector('.list_trigger p');
var list = document.querySelector('.list');
var arrow = document.querySelector('.arrow');
document.addEventListener('click', function(e) { if (e.target === listTrigger || arrow) { list.classList.toggle('is-visible'); arrow.classList.toggle('rotate'); } if (e.target === screen) { list.classList.remove('is-visible'); arrow.classList.remove('rotate'); } return false;
});
Developer | Maxim Konoval |
Username | Said_FD |
Uploaded | September 16, 2022 |
Rating | 3 |
Size | 2,455 Kb |
Views | 28,336 |
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 |
CRM Table Test | 7,579 Kb |
Vanilla CSS Switcher | 2,296 Kb |
Brutal Responsive Landing Page Prototype | 5,482 Kb |
Structure Test | 6,467 Kb |
SVG Scalable Text | 1,451 Kb |
Vanilla CSS Accordion and Responsive Tables | 3,826 Kb |
Tactical Monkey | 2,889 Kb |
Animated Form | 3,485 Kb |
Responsive Price List | 11,134 Kb |
Animated Carousel on CSS with Minimal JS | 6,787 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 |
Knockout Lists | Marinru | 2,531 Kb |
Compare resources on mobile sites | Gyusza | 3,226 Kb |
Awesome | Samarthpd | 2,901 Kb |
Another brick in the wall | Fivera | 1,955 Kb |
A Pen by Bryan | Brydave | 2,286 Kb |
Button shaking | SusanneLundblad | 2,227 Kb |
Process Accordion | Devilskitchen | 31,432 Kb |
Price Comparison Table | Orrinward | 3,459 Kb |
Loading animation | Hafizfattah | 0 Kb |
Sassy Buttons | Elyseholladay | 2,299 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!