File size: 2,495 Bytes
136c0f7 | 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 | @import url("https://fonts.googleapis.com/css?family=Raleway:400,700");
*, *:before, *:after {
box-sizing: border-box;
}
body {
min-height: 100vh;
font-family: "Raleway", sans-serif;
margin: 0;
padding: 0;
overflow: hidden;
}
.container {
position: absolute;
width: 100vw;
height: 100vh;
top: 0;
left: 0;
overflow: hidden;
}
.top:before, .top:after, .bottom:before, .bottom:after {
content: "";
display: block;
position: absolute;
width: 200vmax;
height: 200vmax;
top: 50%;
left: 50%;
margin-top: -100vmax;
transform-origin: 0 50%;
transition: all 0.5s cubic-bezier(0.445, 0.05, 0, 1);
z-index: 20;
opacity: 0.65;
transition-delay: 0.2s;
}
.top:before { transform: rotate(45deg); background: #e46569; }
.top:after { transform: rotate(135deg); background: #ecaf81; }
.bottom:before { transform: rotate(-45deg); background: #60b8d4; }
.bottom:after { transform: rotate(-135deg); background: #3745b5; }
.container:hover .top:before,
.container:hover .top:after,
.container:hover .bottom:before,
.container:hover .bottom:after,
.container:active .top:before,
.container:active .top:after,
.container:active .bottom:before,
.container:active .bottom:after {
margin-left: 200px;
transform-origin: -200px 50%;
transition-delay: 0s;
}
/* Only show the content on hover, with no box, border, or background */
.center {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 0; /* No padding for box effect */
opacity: 0;
pointer-events: none;
background: none;
box-shadow: none;
border: none;
outline: none;
z-index: 10;
transition: opacity 0.5s cubic-bezier(0.445, 0.05, 0, 1);
transition-delay: 0s;
}
.container:hover .center,
.container:active .center {
opacity: 1;
pointer-events: auto;
background: none;
box-shadow: none;
border: none;
outline: none;
transition-delay: 0.2s;
}
.center h2 {
margin-bottom: 20px;
font-weight: 700;
color: #333;
background: none;
border: none;
outline: none;
}
/* Google button styling */
.google-btn {
display: inline-block;
padding: 10px 20px;
font-size: 16px;
font-weight: 600;
color: #fff;
background: #4285F4;
border: none;
border-radius: 2px;
text-decoration: none;
box-shadow: 0 2px 4px rgba(0,0,0,0.2);
transition: background 0.2s;
margin-top: 10px;
}
.google-btn:hover {
background: #3367D6;
}
|