Direction Aware Tiles using clip-path Pure CSS
How do I make an direction aware tiles using clip-path pure css?
Quick explanation in my blog ~\m/. What is a direction aware tiles using clip-path pure css? How do you make a direction aware tiles using clip-path pure css? This script and codes were developed by Elmer Balbin on 22 January 2023, Sunday.
Direction Aware Tiles using clip-path Pure CSS - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Direction Aware Tiles using clip-path Pure CSS</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class='tiles'> <div class='col'> <a href="#"></a> <a href="#"></a> <a href="#"></a> <a href="#"></a> <div class='box'></div> </div> <div class='col'> <a href="#"></a> <a href="#"></a> <a href="#"></a> <a href="#"></a> <div class='box'></div> </div> <div class='col'> <a href="#"></a> <a href="#"></a> <a href="#"></a> <a href="#"></a> <div class='box'></div> </div> <div class='col'> <a href="#"></a> <a href="#"></a> <a href="#"></a> <a href="#"></a> <div class='box'></div> </div> <div class='col'> <a href="#"></a> <a href="#"></a> <a href="#"></a> <a href="#"></a> <div class='box'></div> </div> <div class='col'> <a href="#"></a> <a href="#"></a> <a href="#"></a> <a href="#"></a> <div class='box'></div> </div> <div class='col'> <a href="#"></a> <a href="#"></a> <a href="#"></a> <a href="#"></a> <div class='box'></div> </div> <div class='col'> <a href="#"></a> <a href="#"></a> <a href="#"></a> <a href="#"></a> <div class='box'></div> </div> <div class='col'> <a href="#"></a> <a href="#"></a> <a href="#"></a> <a href="#"></a> <div class='box'></div> </div> <div class='col'> <a href="#"></a> <a href="#"></a> <a href="#"></a> <a href="#"></a> <div class='box'></div> </div> <div class='col'> <a href="#"></a> <a href="#"></a> <a href="#"></a> <a href="#"></a> <div class='box'></div> </div> <div class='col'> <a href="#"></a> <a href="#"></a> <a href="#"></a> <a href="#"></a> <div class='box'></div> </div> <div class='col'> <a href="#"></a> <a href="#"></a> <a href="#"></a> <a href="#"></a> <div class='box'></div> </div> <div class='col'> <a href="#"></a> <a href="#"></a> <a href="#"></a> <a href="#"></a> <div class='box'></div> </div> <div class='col'> <a href="#"></a> <a href="#"></a> <a href="#"></a> <a href="#"></a> <div class='box'></div> </div>
</div>
</body>
</html>
Direction Aware Tiles using clip-path Pure CSS - Script Codes CSS Codes
@import url("https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css");
html, body { margin: 0; padding: 0; background: #f1deb9;
}
.tiles { position: absolute; top: 50%; left: 50%; transform: translateX(-50%) translateY(-50%); width: 750px; height: 450px; perspective: 1000px;
}
.col { position: relative; float: left; margin: 6px; width: calc(150px - 12px); height: calc(150px - 12px);
}
.col a { position: absolute; width: 100%; height: 100%; z-index: 2;
}
.col a:nth-child(1) { -webkit-clip-path: polygon(0 0, 100% 0, 50% 50%); clip-path: polygon(0 0, 100% 0, 50% 50%);
}
.col a:nth-child(2) { -webkit-clip-path: polygon(100% 0, 100% 100%, 50% 50%); clip-path: polygon(100% 0, 100% 100%, 50% 50%);
}
.col a:nth-child(3) { -webkit-clip-path: polygon(0 100%, 50% 50%, 100% 100%); clip-path: polygon(0 100%, 50% 50%, 100% 100%);
}
.col a:nth-child(4) { -webkit-clip-path: polygon(0 0, 50% 50%, 0 100%); clip-path: polygon(0 0, 50% 50%, 0 100%);
}
.col a:hover { z-index: 3; -webkit-clip-path: none; clip-path: none;
}
.col a:nth-child(1):hover ~ .box { transform: rotateX(180deg);
}
.col a:nth-child(2):hover ~ .box { transform: rotateY(180deg);
}
.col a:nth-child(3):hover ~ .box { transform: rotateX(-180deg);
}
.col a:nth-child(4):hover ~ .box { transform: rotateY(-180deg);
}
.col a:nth-child(1):hover ~ .box:after, .col a:nth-child(3):hover ~ .box:after { transform: rotateX(-180deg);
}
.col a:nth-child(2):hover ~ .box:after, .col a:nth-child(4):hover ~ .box:after { transform: rotateY(-180deg);
}
.col .box { position: absolute; width: 100%; height: 100%; font-family: "Open Sans", sans-serif; box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12); transform-style: preserve-3d; transition: transform .3s ease-in-out;
}
.col .box:before { content: ""; position: absolute; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #FFF; font: normal normal normal 14px/1 FontAwesome; font-size: 40px; text-rendering: auto; -webkit-font-smoothing: antialiased; border-radius: 2px; z-index: 2; backface-visibility: hidden;
}
.col .box:after { content: 'Hi!'; position: absolute; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: #333; color: #FFF; font-size: 48px; border-radius: 2px; transition-delay: .15s;
}
.col:nth-child(1) .box:before { content: "\f09a"; background: #3f51b5;
}
.col:nth-child(1) .box:after { background: #3f51b5;
}
.col:nth-child(2) .box:before { content: "\f099"; background: #1da1f2;
}
.col:nth-child(2) .box:after { background: #1da1f2;
}
.col:nth-child(3) .box:before { content: "\f0d5"; background: #dc4a38;
}
.col:nth-child(3) .box:after { background: #dc4a38;
}
.col:nth-child(4) .box:before { content: "\f0e1"; background: #006699;
}
.col:nth-child(4) .box:after { background: #006699;
}
.col:nth-child(5) .box:before { content: "\f173"; background: #36465d;
}
.col:nth-child(5) .box:after { background: #36465d;
}
.col:nth-child(6) .box:before { content: "\f13b"; background: #f16528;
}
.col:nth-child(6) .box:after { background: #f16528;
}
.col:nth-child(7) .box:before { content: "\f13c"; background: #0170ba;
}
.col:nth-child(7) .box:after { background: #0170ba;
}
.col:nth-child(8) .box:before { content: "\f19a"; background: #21759b;
}
.col:nth-child(8) .box:after { background: #21759b;
}
.col:nth-child(9) .box:before { content: "\f09b"; background: #323131;
}
.col:nth-child(9) .box:after { background: #323131;
}
.col:nth-child(10) .box:before { content: "\f1cb"; background: #000000;
}
.col:nth-child(10) .box:after { background: #000000;
}
.col:nth-child(11) .box:before { content: "\f268"; background: #fec540;
}
.col:nth-child(11) .box:after { background: #fec540;
}
.col:nth-child(12) .box:before { content: "\f269"; background: #ef8043;
}
.col:nth-child(12) .box:after { background: #ef8043;
}
.col:nth-child(13) .box:before { content: "\f282"; background: #2c74be;
}
.col:nth-child(13) .box:after { background: #2c74be;
}
.col:nth-child(14) .box:before { content: "\f267"; background: #409ed4;
}
.col:nth-child(14) .box:after { background: #409ed4;
}
.col:nth-child(15) .box:before { content: "\f26a"; background: #cc0f15;
}
.col:nth-child(15) .box:after { background: #cc0f15;
}
Developer | Elmer Balbin |
Username | elmzarnsi |
Uploaded | January 22, 2023 |
Rating | 4.5 |
Size | 3,904 Kb |
Views | 2,024 |
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 |
Material Design Input Placeholder | 1,925 Kb |
Some button hover effects | 1,833 Kb |
Material Design Card Flip - Direction Aware | 3,689 Kb |
Collapsed div borders using CSS3 box-shadow | 1,490 Kb |
Self-Caricature SVG Animation | 5,943 Kb |
Simple hover color slide effect | 1,650 Kb |
My Profile CSS | 3,355 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 |
Mega Menu by Joni | Asakasinsky | 3,171 Kb |
CSS3 Selectables with information rollover | Jasonmayes | 9,565 Kb |
Animated rainbow wave on canvas | Icodeforlove | 2,777 Kb |
Animate a paper plane along an SVG path, looking ahead | PotatoDie | 3,734 Kb |
Product item | Mymahesh11 | 2,256 Kb |
Add This API | ThatGuySam | 2,848 Kb |
Christ the Redeemer | Prashantsani | 2,208 Kb |
Animated Donut Chart | Jplhomer | 3,808 Kb |
A Pen by Adrien Clerbois | AClerbois | 6,501 Kb |
Faces SVG animation | ScavengerFrontend | 2,957 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!