Banner hover test
How do I make an banner hover test?
Wish pseudo elements were able to animate :(. What is a banner hover test? How do you make a banner hover test? This script and codes were developed by Nick Colley on 12 November 2022, Saturday.
Banner hover test - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Banner hover test</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ html,body { height: 100%; }
/* * * * Banner 1! * * * */
.side { position: absolute; top: 0; z-index: -1; height: 100%; width: 60px; background: #DDD; box-shadow: 1px 0 rgba(0,0,0,0.2);
}
.banner { height: 50px; width: 80px; margin-top: 10px; background: orange; border: 1px solid orangered; user-select: none; transition: width 0.25s linear; /*Prevent white-flash*/ backface-visibility:hidden; cursor: pointer;
}
.banner:hover { width: 370px;
}
.fold { display: block; position: relative; z-index: -2; width: 0; height: 0px; border-left: 25px solid transparent; border-top: 25px solid orangered; border-right: 150px solid orangered; border-bottom: 25px solid orangered; background: none; transition: all 0.26s linear; transform: translate(-87px, -120px) rotate(45deg);
}
.banner:hover .fold { border-right: 50px solid orangered; transform: translate(288px, -85px) rotate(45deg);
}
.text { overflow: hidden; width: 85%; padding: 0 10px; line-height: 50px; white-space: nowrap; font-family: serif; font-style: italic; font-size: 2em; color: #FFF; text-overflow: ellipsis; text-shadow: 0 1px orangered;
}
/* * * * Banner 2! * * * */
.banner:first-child { border-right: none;
}
.lip { position: relative; z-index: -1; height: 0; width: 0; margin: -50px 80px; border-right: 25px solid transparent; border-top: 25px solid orange; border-left: 10px solid orange; border-bottom: 25px solid orange; box-shadow: -1px 0 0 1px orangered; transition: all 0.25s linear;
}
.banner:first-child:hover .lip { margin-left: 370px;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div class="banner"> <div class='text'>Banner hover test</div> <div class="lip"></div>
</div>
<div class="banner"> <div class='text'>Banner hover test</div> <div class="fold"></div>
</div>
<div class='side'></div>
</body>
</html>
Banner hover test - Script Codes CSS Codes
html,body { height: 100%; }
/* * * * Banner 1! * * * */
.side { position: absolute; top: 0; z-index: -1; height: 100%; width: 60px; background: #DDD; box-shadow: 1px 0 rgba(0,0,0,0.2);
}
.banner { height: 50px; width: 80px; margin-top: 10px; background: orange; border: 1px solid orangered; user-select: none; transition: width 0.25s linear; /*Prevent white-flash*/ backface-visibility:hidden; cursor: pointer;
}
.banner:hover { width: 370px;
}
.fold { display: block; position: relative; z-index: -2; width: 0; height: 0px; border-left: 25px solid transparent; border-top: 25px solid orangered; border-right: 150px solid orangered; border-bottom: 25px solid orangered; background: none; transition: all 0.26s linear; transform: translate(-87px, -120px) rotate(45deg);
}
.banner:hover .fold { border-right: 50px solid orangered; transform: translate(288px, -85px) rotate(45deg);
}
.text { overflow: hidden; width: 85%; padding: 0 10px; line-height: 50px; white-space: nowrap; font-family: serif; font-style: italic; font-size: 2em; color: #FFF; text-overflow: ellipsis; text-shadow: 0 1px orangered;
}
/* * * * Banner 2! * * * */
.banner:first-child { border-right: none;
}
.lip { position: relative; z-index: -1; height: 0; width: 0; margin: -50px 80px; border-right: 25px solid transparent; border-top: 25px solid orange; border-left: 10px solid orange; border-bottom: 25px solid orange; box-shadow: -1px 0 0 1px orangered; transition: all 0.25s linear;
}
.banner:first-child:hover .lip { margin-left: 370px;
}
Developer | Nick Colley |
Username | nickcolley |
Uploaded | November 12, 2022 |
Rating | 3 |
Size | 2,825 Kb |
Views | 18,216 |
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 |
Custom Soundcloud Player | 3,033 Kb |
Subtle Quote | 3,379 Kb |
Henry Homesweet Boxmodel | 3,747 Kb |
Linux Install Terminal | 2,259 Kb |
One element icon | 1,976 Kb |
Erno | 5,311 Kb |
Brightness regulation UI design | 2,713 Kb |
Horizontal Scroll with device motion | 2,446 Kb |
Chrome Bookmark Bar | 1,707 Kb |
Diagonal Nav bar | 2,392 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 |
Box Shadow Effects | Retrofuturistic | 2,143 Kb |
Filter inputs | Rowinf | 1,721 Kb |
Experiments with Vertical Centering | KatieK2 | 3,924 Kb |
CSS3 Selectables with information rollover | Jasonmayes | 9,565 Kb |
A Pen by utcwebdev | Utcwebdev | 2,856 Kb |
Count checked checkboxes with jQuery | Mestika | 2,343 Kb |
Minimelephant | Smashlee | 2,507 Kb |
Donut Chart example - MorrisJS | Capelo | 2,385 Kb |
Tail rose iris lined | Kbrtrm | 1,846 Kb |
Sass random color animation | Jotavejv | 4,827 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!