Cutting the image into 2 parts when hovering the mouse

Size
2,824 Kb
Views
16,192

How do I make an cutting the image into 2 parts when hovering the mouse?

What is a cutting the image into 2 parts when hovering the mouse? How do you make a cutting the image into 2 parts when hovering the mouse? This script and codes were developed by KONSTANTIN TRUNOV on 26 November 2022, Saturday.

Cutting the image into 2 parts when hovering the mouse Previews

Cutting the image into 2 parts when hovering the mouse - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Cutting the image into 2 parts when hovering the mouse</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="container"> <div class="box box-1"> <div class="img"> HELLO </div> </div> <div class="box box-2"> <div class="img"> MY </div> </div> <div class="box box-3"> <div class="minibox"></div> <div class="img"> FRIEND </div> </div>
</div>
</body>
</html>

Cutting the image into 2 parts when hovering the mouse - Script Codes CSS Codes

@import url('https://fonts.googleapis.com/css?family=Kumar+One');
.container { background: #17141F; min-height: 100vh; height: 100%; display: flex; justify-content: space-around; flex-wrap: wrap; font-family: 'Kumar One', cursive;
}
.box { width: 400px; height: 300px; margin-top: 50px; background: #6441A4; border: 10px solid #201C2B; box-shadow: 1px 1px 10px #000; text-align: center; font-size: 40px; line-height: 300px; color: #fff; text-shadow: 1px 1px 3px #000; position: relative; overflow: hidden;
}
.box:hover { cursor: pointer;
}
.box-1::before { content: ''; display: block; width: 100%; height: 50%; transition: all .7s ease; position: absolute; background: url('http://truman.pro/upwork/for_codepen/1.jpg') no-repeat; background-position: 0 0;
}
.box-1::after { content: ''; display: block; width: 100%; height: 50%; transition: all .7s ease; position: absolute; bottom: 0; background: url('http://truman.pro/upwork/for_codepen/1.jpg') no-repeat; background-position: 0 -150px;
}
.box-1:hover::before { transform: translateY(-100%);
}
.box-1:hover::after { transform: translateY(100%);
}
.box-2::before { content: ''; display: block; width: 50%; height: 100%; background: url('http://truman.pro/upwork/for_codepen/2.jpg') no-repeat; background-position: 0 0; position: absolute; transition: all .7s ease;
}
.box-2::after { content: ''; display: block; width: 50%; height: 100%; top: 0; right: 0; background: url('http://truman.pro/upwork/for_codepen/2.jpg') no-repeat; background-position: -200px 0; position: absolute; transition: all .7s ease;
}
.box-2:hover::before { transform: translateX(-200px);
}
.box-2:hover::after { transform: translateX(200px);
}
.box-3::before { content: ''; display: block; width: 50%; height: 100%; background: url('http://truman.pro/upwork/for_codepen/3.jpg') no-repeat; background-position: 0 0; position: absolute; transition: all .7s ease;
}
.box-3::after { content: ''; display: block; width: 50%; height: 100%; top: 0; right: 0; background: url('http://truman.pro/upwork/for_codepen/3.jpg') no-repeat; background-position: -200px 0; position: absolute; transition: all .7s ease;
}
.box-3:hover::before { transform: translateY(300px);
}
.box-3:hover::after { transform: translateY(-300px);
}
Cutting the image into 2 parts when hovering the mouse - Script Codes
Cutting the image into 2 parts when hovering the mouse - Script Codes
Home Page Home
Developer KONSTANTIN TRUNOV
Username truman55
Uploaded November 26, 2022
Rating 3
Size 2,824 Kb
Views 16,192
Do you need developer help for Cutting the image into 2 parts when hovering the mouse?

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!

KONSTANTIN TRUNOV (truman55) Script Codes
Create amazing video scripts 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!