html – The button is not displayed as I would like it to be


I want my buttons like this https://codepen.io/jouanmarcel/pen/LYYEmmO
but when I put that in my code, something like that comes out
[enter image description here][1]

[1]: https://i.stack.imgur.com/HrXEQ.png what for my comes out

<!DOCTYPE html>
<html>
<head>
    <body>
    <link rel="stylesheet" href="css/style.css">
    <div class = box>
<button class="button">Fire</button>
<button class="button">Fire</button>
<button class="button">Ice</button>
<button class="button">Ice</button>


</body>
</head>


</html>

css

body {

    padding: 0;
    margin: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

}


.button {
    border: 1px solid green;
    backdrop-filter: blur(10px);
    transform: skewX(-10deg);
    height: 50px;
    width: 200px;
    border-radius: 20px 5px 20px 0px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .3s ease;
    font: 15px sans-serif;
    font-weight: 300;
    text-shadow: 0 0 20px #fff;
    text-transform: uppercase;
    animation: breath2 2s .5s infinite alternate;
    transition: all .2s ease;
    cursor: pointer;
}

    button:before {
        content: "";
        display: block;
        width: calc(100% - 22px);
        height: calc(50px - 8px);
        animation: breath 2s infinite alternate;
        left: 10px;
        top: 3px;
        position: absolute;
        background-color: transparent;
        border: 1px solid #fff;
        border-radius: 15px 3px 15px 3px;
  }

    button.fire {
        border-color: rgba(255, 236, 168, 1);
        background-image: linear-gradient(to bottom, transparentize(rgba(255, 138, 48, 1), .4), transparentize(rgba(240, 96, 29, 1), .4));
        box-shadow: 0 0 70px transparentize(rgba(255, 138, 48, 1), .4), 0 5px 20px transparentize(rgba(255, 138, 48, 1), .4), inset 0 1px rgba(255, 236, 168, 1), inset 0 -1px rgba(255, 236, 168, 1);
        color: rgba(255, 236, 168, 1),
  }
        button:before {
            box-shadow: inset 0 0 30px 0 rgba(255, 236, 168, 1);
    }
    button.ice {
        border-color: rgba(168, 236, 255, 1);
        background-image: linear-gradient(to bottom, transparentize(rgba(48, 138, 255, 1), .5), transparentize(rrgba(29, 96, 240, 1), .5));
        box-shadow: 0 0 70px transparentize(rgba(48, 138, 255, 1), .5), 0 5px 20px transparentize(rgba(48, 138, 255, 1), .5), inset 0 1px rgba(255, 236, 168, 1), inset 0 -1px rgba(255, 236, 168, 1);
        color: rgba(168, 236, 255, 1);
  }
        button:before {
            box-shadow: inset 0 0 30px 0 rgba(168, 236, 255, 1)
    }
    
    button:hover 
        button.fire {
            box-shadow: 0 0 70px transparentize(rgba(255, 138, 48, 1), .2), 0 5px 20px transparentize(rgba(255, 138, 48, 1), .2), inset 0 1px rgba(255, 236, 168, 1), inset 0 -1px rgba(255, 236, 168, 1)
    }
            button:before {
                box-shadow: inset 0 0 50px 0 rgba(255, 236, 168, 1)
      }
        button.ice {
            box-shadow: 0 0 70px transparentize(rgba(48, 138, 255, 1), .2), 0 5px 20px transparentize(rgba(48, 138, 255, 1), .2), inset 0 1px rgba(168, 236, 255, 1), inset 0 -1px rgba(168, 236, 255, 1)
    }
      button:before {

                box-shadow: inset 0 0 50px 0 rgba(168, 236, 255, 1)
      }

      
            
    button + button {
        margin-top: 15px;
        animation-delay: .3s;
  }

@keyframes breath {
    0% {
        transform: scaleX(1);
  }
    100% {
        transform: scaleX(0.95);
     }
 }



@keyframes breath2 {
    0% {
        transform: skewX(-10deg) scaleX(1);
  }
    100% {
        transform: skewX(-10deg) scaleX(0.95);
     }
    }


.ref {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, .6);
    border-radius: 3px;
    padding: 5px 8px;
    position: absolute;
    font-size: 16px;
    bottom: 10px;
    right: 10px;
    color: #fff;
    font-weight: 300;
    font-family: sans-serif;
    text-decoration: none;
    font-size: 12px;
}

idk how to fix it want it like so https://codepen.io/jouanmarcel/pen/LYYEmmO

sorry for my english



Source link

Latest articles

Related articles

Leave a reply

Please enter your comment!
Please enter your name here