Banner hover test

Developer
Size
2,825 Kb
Views
18,216

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 Previews

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;
}
Banner hover test - Script Codes
Banner hover test - Script Codes
Home Page Home
Developer Nick Colley
Username nickcolley
Uploaded November 12, 2022
Rating 3
Size 2,825 Kb
Views 18,216
Do you need developer help for Banner hover test?

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!

Nick Colley (nickcolley) Script Codes
Create amazing marketing copy with AI!

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!