Barberpole Hover Animation
How do I make an barberpole hover animation?
From pages like this: http://www.uniqlo.com/us/mens-clothingOnly they use an animated GIF and this is CSS only. Would have like to not do the extra div for the hover, but there is no background-opacity.... What is a barberpole hover animation? How do you make a barberpole hover animation? This script and codes were developed by Chris Coyier on 11 October 2022, Tuesday.
Barberpole Hover Animation - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Barberpole Hover Animation</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! */ @import url(https://fonts.googleapis.com/css?family=Ropa+Sans);
body { padding: 20px; font-family: 'Ropa Sans', sans-serif;
}
.product { width: 376px; padding: 15px; position: relative; float: left; margin: 0 20px 0 0;
}
.product > img { display: block; position: relative;
}
.product:hover .product-hover, .product:active .product-hover { opacity: 1;
}
.product-hover { position: absolute; top: 0; left: 0; right: 0; bottom: 0; opacity: 0; transition: opacity 0.3s ease; background-size: 30px 30px; background-image: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.1) 75%, transparent 75%, transparent); animation: barberpole 0.5s linear infinite;
}
@keyframes barberpole { from { background-position: 0 0; } to { background-position: 60px 30px; }
}
.product-info { position: absolute; bottom: 30px; right: 30px; background: white; width: 150px; padding: 10px 10px 50px 10px;
}
.subhead { color: #f00; text-transform: uppercase; font-weight: bold;
}
.product-name { color: #990033; text-transform: uppercase; font-weight: bold; margin: 0; letter-spacing: -1px;
}
.price { position: absolute; bottom: 10px; right: 10px;
}
.amount { color: red; font-size: 150%;
}
.amount > span { font-size: 75%;
}
h1 { font-size: 72px; margin: 2px 0 0 0;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div class="product"> <div class="product-hover"></div> <img src="http://fillmurray.com/300/300"/> <div class="product-info"> <div class="subhead">Sale</div> <h2 class="product-name">Fleece</h2> <p class="product-description">Beat the chill and get cozy.</p> <div class="price"> <span class="from">from</span> <span class="amount"> <span>$</span>9.90 </span> </div> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
</body>
</html>
Barberpole Hover Animation - Script Codes CSS Codes
@import url(https://fonts.googleapis.com/css?family=Ropa+Sans);
body { padding: 20px; font-family: 'Ropa Sans', sans-serif;
}
.product { width: 376px; padding: 15px; position: relative; float: left; margin: 0 20px 0 0;
}
.product > img { display: block; position: relative;
}
.product:hover .product-hover, .product:active .product-hover { opacity: 1;
}
.product-hover { position: absolute; top: 0; left: 0; right: 0; bottom: 0; opacity: 0; transition: opacity 0.3s ease; background-size: 30px 30px; background-image: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.1) 75%, transparent 75%, transparent); animation: barberpole 0.5s linear infinite;
}
@keyframes barberpole { from { background-position: 0 0; } to { background-position: 60px 30px; }
}
.product-info { position: absolute; bottom: 30px; right: 30px; background: white; width: 150px; padding: 10px 10px 50px 10px;
}
.subhead { color: #f00; text-transform: uppercase; font-weight: bold;
}
.product-name { color: #990033; text-transform: uppercase; font-weight: bold; margin: 0; letter-spacing: -1px;
}
.price { position: absolute; bottom: 10px; right: 10px;
}
.amount { color: red; font-size: 150%;
}
.amount > span { font-size: 75%;
}
h1 { font-size: 72px; margin: 2px 0 0 0;
}
Developer | Chris Coyier |
Username | chriscoyier |
Uploaded | October 11, 2022 |
Rating | 4.5 |
Size | 3,674 Kb |
Views | 38,456 |
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 |
Transformer Tabs | 5,160 Kb |
Stairway Hover Nav | 3,213 Kb |
Data on Performance Culture | 1,948 Kb |
Pull Quote from NY Post | 4,622 Kb |
Simple Responsive Form | 2,698 Kb |
Sticky Footer | 2,089 Kb |
Striped Headers | 3,177 Kb |
Bar Navigation with Flexbox and SVG icons | 5,995 Kb |
Label Pattern with just CSS | 3,617 Kb |
Animation to Explain CSS Triangles | 4,964 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 |
Brent Burns Tribute Page | Nevada48 | 2,569 Kb |
Simple CSS loader. | Cabrera | 2,574 Kb |
Animated rainbow wave on canvas | Icodeforlove | 2,777 Kb |
Simple blog concept | Drew_mc | 2,666 Kb |
Marching Squares Visualized | Sakri | 7,074 Kb |
Twitch API | Coderpilot | 3,412 Kb |
A Pen by aleen42 | Aleen42 | 11,473 Kb |
Bubble animation | Ftabor | 6,565 Kb |
A Pen by Jess | Jessamyne | 5,100 Kb |
SVG Transform vs CSS Transform | AmeliaBR | 4,175 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!