1/*Zoom on hover*/
2
3<style>
4.zoom {
5 padding: 50px;
6 background-color: green;
7 transition: transform .2s; /* Animation */
8 width: 200px;
9 height: 200px;
10 margin: 0 auto;
11}
12
13.zoom:hover {
14 transform: scale(1.5); /* (150% zoom)*/
15}
16</style>
17
18<div class="zoom"></div>
19
20/*credits: w3schools.com */
1/* Point-zoom Container */.point-img-zoom img { transform-origin: 65% 75%; transition: transform 1s, filter .5s ease-out;}/* The Transformation */.point-img-zoom:hover img { transform: scale(5);}
1.child::before {
2 content: "";
3 display: none;
4 height: 100%;
5 width: 100%;
6 position: absolute;
7 top: 0;
8 left: 0;
9 background-color: rgba(52, 73, 94, 0.75);
10}
11
12.parent:hover .child:before,
13.parent:focus .child:before {
14 display: block;
15}
1.parent {
2 width: 400px;
3 height: 300px;
4}
5
6.child {
7 width: 100%;
8 height: 100%;
9 background-color: black; /* fallback color */
10 background-image: url("images/city.jpg");
11 background-position: center;
12 background-size: cover;
13}