Dynamic Image Cover
How do I make an dynamic image cover?
Trying to make something that lets you interact with an image with something that covers an image.. What is a dynamic image cover? How do you make a dynamic image cover? This script and codes were developed by Albert Miller on 23 August 2022, Tuesday.
Dynamic Image Cover - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Dynamic Image Cover</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="base"> <div class="content"> <img src="http://placehold.it/500x300" /> </div> <div class="cover"> <div class="cover-top-group"><p class="deactivate-cover">This item is available</p></div> <div class="cover-bottom-group"><button class="btn">Buy Now</button></div> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.14/angular.min.js'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Dynamic Image Cover - Script Codes CSS Codes
@import url(http://fonts.googleapis.com/css?family=Roboto:400);
.base { display: inline-block; font-family: 'Roboto'; margin: 30px 30px; position: relative;
}
.base .content { position: relative; z-index: 2;
}
.base .content img { display: block;
}
.base .cover { background-color: rgba(0, 0, 0, 0.4); font-size: 1.2em; opacity: 0; padding: 5px; position: absolute; right: 0; top: 0; bottom: 0; left: 0; transition: opacity .4s linear, z-index .4s step-end; z-index: 1;
}
.base .cover.show { opacity: 1; transition: opacity .4s linear, z-index .4s step-start; z-index: 3;
}
.base .cover p { color: #fff; margin: 5px;
}
.base .cover .cover-top-group { left: 0; position: absolute; text-align: center; top: 30px; right: 0;
}
.base .cover .cover-bottom-group { bottom: 40px; left: 0; position: absolute; text-align: center; right: 0;
}
.base .activate-cover,
.base .deactivate-cover { cursor: pointer;
}
.btn { -webkit-appearance: none; background-color: transparent; border: none; border-radius: 5px; color: #fff; cursor: pointer; display: inline-block; font-family: 'Roboto', sans-serif; line-height: 1.2em; padding: .6em 1em; text-transform: uppercase; vertical-align: top;
}
.btn:hover:enabled, .btn:focus:enabled { background-color: #414141;
}
.btn:disabled { background-color: #414141; color: #fff; cursor: auto;
}
Dynamic Image Cover - Script Codes JS Codes
$('.btn').on('click', function(){ alert('It worked');
});
$('.base').mouseenter(function(){ $('.cover').addClass('show'); console.log('Add Class Show');
}).mouseleave(function(){ $('.cover').removeClass('show'); console.log('Remove Class Show');
});
![Dynamic Image Cover - Script Codes](http://shots.codepen.io/SinceSidSlid/pen/YyOwGy-512.jpg)
Developer | Albert Miller |
Username | SinceSidSlid |
Uploaded | August 23, 2022 |
Rating | 3 |
Size | 3,065 Kb |
Views | 24,288 |
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 |
Customer Select | 3,178 Kb |
Material Floating Action Button | 3,572 Kb |
Loading State | 2,600 Kb |
Scroll Lock | 2,497 Kb |
A Pen by Albert Miller | 1,382 Kb |
Loading State 2 | 2,827 Kb |
Material Week Calendar | 3,189 Kb |
Material Calendar | 2,818 Kb |
Hierarchy | 5,337 Kb |
Work Day Clock | 4,102 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 |
Gulpfile | Aimhigherwebdesign-amy | 1,765 Kb |
Update CSS Variables with JS | Wesbos | 2,335 Kb |
Polygon Logo in CSS | Kai | 3,412 Kb |
Vertically rotating text with CSS | Nopr | 2,141 Kb |
3d css cube | Semenchenko | 4,578 Kb |
Cartoon Bomb | Tcmulder | 4,929 Kb |
Draggable directive | YahyaKacem | 2,277 Kb |
Vanilla JS - A toggleClass function | Woodwork | 2,532 Kb |
Sinclair Research Computers | MattCowley | 3,068 Kb |
Sencha Touch 2.3.1 Basic Grid Example | Trozdol | 2,770 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!