mirror of
https://github.com/uiverse-io/galaxy.git
synced 2025-11-28 05:00:22 +08:00
180 lines
No EOL
4.2 KiB
HTML
180 lines
No EOL
4.2 KiB
HTML
<div class="back">
|
|
<div class="button_base b_3d">
|
|
<div>button</div>
|
|
<div>button</div>
|
|
<div>button</div>
|
|
<div>button</div>
|
|
</div>
|
|
</div>
|
|
|
|
<style>
|
|
/* From Uiverse.io by nima-mollazadeh - Tags: button, button, text, yellow, purple, centered, rectangular, contrast, split, bicolor */
|
|
.button_base {
|
|
margin: 0;
|
|
border: 0;
|
|
font-size: 18px;
|
|
position: relative;
|
|
top: 50%;
|
|
left: 50%;
|
|
margin-top: -25px;
|
|
margin-left: -100px;
|
|
width: 200px;
|
|
height: 50px;
|
|
text-align: center;
|
|
box-sizing: border-box;
|
|
-webkit-box-sizing: border-box;
|
|
-moz-box-sizing: border-box;
|
|
cursor: default;
|
|
}
|
|
|
|
.button_base:hover {
|
|
cursor: pointer;
|
|
}
|
|
|
|
.b_3d {
|
|
perspective: 500px;
|
|
-webkit-perspective: 500px;
|
|
-moz-perspective: 500px;
|
|
transform-style: preserve-3d;
|
|
-webkit-transform-style: preserve-3d;
|
|
}
|
|
|
|
.b_3d div {
|
|
position: absolute;
|
|
text-align: center;
|
|
padding: 10px;
|
|
border: #000000 solid 1px;
|
|
pointer-events: none;
|
|
box-sizing: border-box;
|
|
-webkit-box-sizing: border-box;
|
|
-moz-box-sizing: border-box;
|
|
}
|
|
|
|
.b_3d div:nth-child(1) {
|
|
color: #ffffff;
|
|
background-color: #7c00fe;
|
|
z-index: 0;
|
|
width: 100%;
|
|
height: 50px;
|
|
clip: rect(0px, 100px, 50px, 0px);
|
|
position: absolute;
|
|
transition: all 0.2s ease;
|
|
-webkit-transition: all 0.2s ease;
|
|
-moz-transition: all 0.2s ease;
|
|
transform: rotateX(0deg);
|
|
-webkit-transform: rotateX(0deg);
|
|
-moz-transform: rotateX(0deg);
|
|
transform-origin: 50% 50% -25px;
|
|
-webkit-transform-origin: 50% 50% -25px;
|
|
-moz-transform-origin: 50% 50% -25px;
|
|
}
|
|
|
|
.b_3d div:nth-child(2) {
|
|
color: #000000;
|
|
background-color: #f9e400;
|
|
z-index: -1;
|
|
width: 100%;
|
|
height: 50px;
|
|
clip: rect(0px, 100px, 50px, 0px);
|
|
position: absolute;
|
|
transform: rotateX(90deg);
|
|
-webkit-transform: rotateX(90deg);
|
|
-moz-transform: rotateX(90deg);
|
|
transition: all 0.2s ease;
|
|
-webkit-transition: all 0.2s ease;
|
|
-moz-transition: all 0.2s ease;
|
|
transform-origin: 50% 50% -25px;
|
|
-webkit-transform-origin: 50% 50% -25px;
|
|
-moz-transform-origin: 50% 50% -25px;
|
|
}
|
|
|
|
.b_3d div:nth-child(3) {
|
|
color: #000000;
|
|
background-color: #f9e400;
|
|
z-index: 0;
|
|
width: 100%;
|
|
height: 50px;
|
|
clip: rect(0px, 200px, 50px, 100px);
|
|
position: absolute;
|
|
transition: all 0.2s ease 0.1s;
|
|
-webkit-transition: all 0.2s ease 0.1s;
|
|
-moz-transition: all 0.2s ease 0.1s;
|
|
transform: rotateX(0deg);
|
|
-webkit-transform: rotateX(0deg);
|
|
-moz-transform: rotateX(0deg);
|
|
transform-origin: 50% 50% -25px;
|
|
-webkit-transform-origin: 50% 50% -25px;
|
|
-moz-transform-origin: 50% 50% -25px;
|
|
}
|
|
|
|
.b_3d div:nth-child(4) {
|
|
color: #ffffff;
|
|
background-color: #7c00fe;
|
|
z-index: -1;
|
|
width: 100%;
|
|
height: 50px;
|
|
clip: rect(0px, 200px, 50px, 100px);
|
|
position: absolute;
|
|
transform: rotateX(-90deg);
|
|
-webkit-transform: rotateX(-90deg);
|
|
-moz-transform: rotateX(-90deg);
|
|
transition: all 0.2s ease 0.1s;
|
|
-webkit-transition: all 0.2s ease 0.1s;
|
|
-moz-transition: all 0.2s ease 0.1s;
|
|
transform-origin: 50% 50% -25px;
|
|
-webkit-transform-origin: 50% 50% -25px;
|
|
-moz-transform-origin: 50% 50% -25px;
|
|
}
|
|
|
|
.b_3d:hover div:nth-child(1) {
|
|
background-color: #7c00fe;
|
|
transition: all 0.2s ease;
|
|
-webkit-transition: all 0.2s ease;
|
|
-moz-transition: all 0.2s ease;
|
|
transform: rotateX(-90deg);
|
|
-webkit-transform: rotateX(-90deg);
|
|
-moz-transform: rotateX(-90deg);
|
|
}
|
|
|
|
.b_3d:hover div:nth-child(2) {
|
|
color: #000000;
|
|
transition: all 0.2s ease;
|
|
-webkit-transition: all 0.2s ease;
|
|
-moz-transition: all 0.2s ease;
|
|
transform: rotateX(0deg);
|
|
-webkit-transform: rotateX(0deg);
|
|
-moz-transform: rotateX(0deg);
|
|
}
|
|
|
|
.b_3d:hover div:nth-child(3) {
|
|
background-color: #f9e400;
|
|
transition: all 0.2s ease 0.1s;
|
|
-webkit-transition: all 0.2s ease 0.1s;
|
|
-moz-transition: all 0.2s ease 0.1s;
|
|
transform: rotateX(90deg);
|
|
-webkit-transform: rotateX(90deg);
|
|
-moz-transform: rotateX(90deg);
|
|
}
|
|
|
|
.b_3d:hover div:nth-child(4) {
|
|
color: #ffffff;
|
|
transition: all 0.2s ease 0.1s;
|
|
-webkit-transition: all 0.2s ease 0.1s;
|
|
-moz-transition: all 0.2s ease 0.1s;
|
|
transform: rotateX(0deg);
|
|
-webkit-transform: rotateX(0deg);
|
|
-moz-transform: rotateX(0deg);
|
|
}
|
|
|
|
.back {
|
|
height: 200px;
|
|
float: left;
|
|
box-sizing: border-box;
|
|
-webkit-box-sizing: border-box;
|
|
-moz-box-sizing: border-box;
|
|
counter-increment: bc;
|
|
padding: 0px 5px 5px 5px;
|
|
}
|
|
|
|
</style>
|
|
|