*{
    margin: 0;
    padding: 0;
    list-style: none;
}
html,body{
    position: relative;
    width: 100%;
    height: 100%;
}
.wrapper{
    width: 300px;
    height: 300px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate3D(-50%,-50%,0);
    /* border: 1px solid #000; */
}
.wrapper .cube{
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transform-origin: center center -150px;
    transform: rotateX(0deg);
    transition: all 0.5s;
}
.wrapper .cube .surface{
    width: 100%;
    height: 100%;
    font-size: 50px;
    font-weight: 600;
    text-align: center;
    line-height: 300px;
    border: 1px solid black;
    position: absolute;
    transform-origin: center center -150px;
    background-color: #fff;
}
.wrapper .cube .surface:nth-of-type(1){
    transform: rotate(0);
}
.wrapper .cube .surface:nth-of-type(2){
    transform: rotateX(90deg);
}
.wrapper .cube .surface:nth-of-type(3){
    transform: rotateX(-90deg);
}
.wrapper .cube .surface:nth-of-type(4){
    transform: rotateY(90deg);
}
.wrapper .cube .surface:nth-of-type(5){
    transform: rotateY(-90deg);
}
.wrapper .cube .surface:nth-of-type(6){
    transform: rotateX(180deg);
}
