Hover Buttons
How do I make an hover buttons?
An example of using the same style for each button with classes and then setting a different image per button using ids.. What is a hover buttons? How do you make a hover buttons? This script and codes were developed by Lauren on 18 September 2022, Sunday.
Hover Buttons - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Hover Buttons</title> <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! */ * { margin: 0px; padding: 0px; box-sizing: border-box;
}
html, body { background: #43423A; text-align: center; width: 100%; height: 100%;
}
.button { display: inline-block; margin: 20px 5px 0px; position: relative; background-position: top center; width: 200px; height: 360px; cursor: pointer;
}
.button span { display: block; position: absolute; top: 0px; left: 0px; bottom: 0px; right: 0px; background-position: bottom center; opacity: 0; transition: opacity 0.5s linear 0s;
}
.button:hover span { opacity: 1;
}
.button#road, .button#road span { background-image: url('https://www.columbia.edu/~ljz2112/resources/button_sprite_road.png');
}
.button#city, .button#city span { background-image: url('https://www.columbia.edu/~ljz2112/resources/button_sprite_city.png');
}
.button#flower, .button#flower span { background-image: url('https://www.columbia.edu/~ljz2112/resources/button_sprite_flower.png');
}
.button#wire, .button#wire span { background-image: url('https://www.columbia.edu/~ljz2112/resources/button_sprite_wire.png');
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div id="road" class="button"><span></span></div>
<div id="city" class="button"><span></span></div>
<div id="flower" class="button"><span></span></div>
<div id="wire" class="button"><span></span></div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
</body>
</html>
Hover Buttons - Script Codes CSS Codes
* { margin: 0px; padding: 0px; box-sizing: border-box;
}
html, body { background: #43423A; text-align: center; width: 100%; height: 100%;
}
.button { display: inline-block; margin: 20px 5px 0px; position: relative; background-position: top center; width: 200px; height: 360px; cursor: pointer;
}
.button span { display: block; position: absolute; top: 0px; left: 0px; bottom: 0px; right: 0px; background-position: bottom center; opacity: 0; transition: opacity 0.5s linear 0s;
}
.button:hover span { opacity: 1;
}
.button#road, .button#road span { background-image: url('https://www.columbia.edu/~ljz2112/resources/button_sprite_road.png');
}
.button#city, .button#city span { background-image: url('https://www.columbia.edu/~ljz2112/resources/button_sprite_city.png');
}
.button#flower, .button#flower span { background-image: url('https://www.columbia.edu/~ljz2112/resources/button_sprite_flower.png');
}
.button#wire, .button#wire span { background-image: url('https://www.columbia.edu/~ljz2112/resources/button_sprite_wire.png');
}
Developer | Lauren |
Username | phantomesse |
Uploaded | September 18, 2022 |
Rating | 3.5 |
Size | 2,311 Kb |
Views | 26,312 |
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 |
Thumbnail Example | 2,687 Kb |
Flexbox Column Stretch | 2,487 Kb |
Custom Dropdown Menu | 2,236 Kb |
Mondrian Generator | 4,791 Kb |
Food Choose-Your-Own Adventure | 3,174 Kb |
Messages Inbox | 2,417 Kb |
Content Slider | 3,779 Kb |
Switching Images | 2,412 Kb |
Sticky Navbar | 5,106 Kb |
Image Slider | 3,498 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 |
Responsive Boxes without Images | Andymcfee | 4,120 Kb |
Background Images | Jooonebug | 2,100 Kb |
HTML5 Video Autoplay | Zivcos | 1,352 Kb |
Rainbow Drops | Csbarnes | 2,365 Kb |
IbrahimJabbari-Effect21 | Ibrahimjabbari | 1,882 Kb |
Login with flip 3d animation | Mariusbalaj | 3,014 Kb |
Importable Clearfix | Corysimmons | 1,411 Kb |
Toggling Divs with jQuery | Yying6 | 1,967 Kb |
3D-box | Parthviroja | 2,346 Kb |
Stylize Stories | Jvhti | 2,465 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!