1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
| @import url('https://fonts.googleapis.com/css?family=Poppins:100,200,300,400,500,600,700,800,900&display=swap');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: #222;
}
.container {
position: relative;
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
padding: 60px 0;
gap: 60px;
}
.container .box {
position: relative;
width: 300px;
height: 350px;
background: #2e2e2e;
display: flex;
justify-content: center;
align-items: center;
}
.container .box::before {
content: '';
position: absolute;
inset: -10px 50px;
border-top: 4px solid var(--clr);
border-bottom: 4px solid var(--clr);
z-index: -1;
transform: skewY(15deg);
transition: 0.5s ease-in-out;
}
.container .box:hover::before {
transform: skewY(0deg);
inset: -10px 40px;
}
.container .box::after {
content: '';
position: absolute;
inset: 60px -10px;
border-left: 4px solid var(--clr);
border-right: 4px solid var(--clr);
z-index: -1;
transform: skew(15deg);
transition: 0.5s ease-in-out;
}
.container .box:hover::after {
transform: skew(0deg);
inset: 40px -10px;
}
.container .box .content {
position: relative;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
text-align: center;
gap: 20px;
padding: 0 20px;
width: 100%;
height: 100%;
overflow: hidden;
}
.container .box .content .icon {
color: var(--clr);
width: 80px;
height: 80px;
box-shadow: 0 0 0 4px #2e2e2e,
0 0 0 6px var(--clr);
display: flex;
justify-content: center;
align-items: center;
font-size: 2.5em;
background: #2e2e2e;
transition: 0.5s ease-in-out;
}
.container .box:hover .content .icon {
background: var(--clr);
color: #2e2e2e;
box-shadow: 0 0 0 4px #2e2e2e,
0 0 0 300px var(--clr);
}
.container .box .content .text h3 {
font-size: 1.5em;
color: #fff;
font-weight: 500;
transition: 0.5s ease-in-out;
}
.container .box:hover .content .text h3 {
color: #2e2e2e;
}
.container .box .content .text p {
color: #999;
transition: 0.5s ease-in-out;
}
.container .box:hover .content .text p {
color: #2e2e2e;
}
.container .box .content .text a {
position: relative;
background: var(--clr);
color: #2e2e2e;
padding: 8px 15px;
display: inline-block;
text-decoration: none;
font-weight: 500;
margin-top: 10px;
transition: 0.5s ease-in-out;
}
.container .box:hover .content .text a {
background: #2e2e2e;
color: var(--clr);
} |
Partager