Cutting the image into 2 parts when hovering the mouse
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 - 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);
}
Developer | KONSTANTIN TRUNOV |
Username | truman55 |
Uploaded | November 26, 2022 |
Rating | 3 |
Size | 2,824 Kb |
Views | 16,192 |
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 |
Balloons SVG | 1,658 Kb |
Progress bar with animation | 3,234 Kb |
Range-filter | 2,551 Kb |
Background effect for text | 2,007 Kb |
HAMBURGER ANIMATION | 2,620 Kb |
Random colored balls | 2,820 Kb |
Css animation - FIFA | 4,171 Kb |
Neon clock | 4,675 Kb |
A Pen by KONSTANTIN TRUNOV | 2,669 Kb |
Simple CSS3 Text animation | 3,556 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 |
Wikipedia Viewer | Codinger | 4,681 Kb |
SVG Playground | Roygwells | 1,834 Kb |
Adding Items | Valhead | 4,008 Kb |
Starfield using KineticJS | Asp | 3,512 Kb |
Learning FlexBox | Alex_rodrigues | 2,821 Kb |
Importable Clearfix | Corysimmons | 1,411 Kb |
Contact | GanNichiHa | 2,514 Kb |
Transitioning application screens with semantically named classes | Djgrant | 3,697 Kb |
A Pen by Malith Hettiarachchi | MalZiiirA | 5,531 Kb |
SCSS Unit Conversion | Jakob-e | 8,210 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!