button 꾸미기

유요한·2022년 11월 22일
0

버튼을 꾸며보자~

	<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>slide Button</title>
    <link href="../css/style.css" rel="stylesheet"/>
</head>
<body>
    <button class="btn">Button</button>
</body>
</html>
	body{
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #3c3e70;
}

.btn{
    font-size: 25px;
    padding: 15px 30px;
    border: 3px solid gold;
    background-color: transparent;
    color: gold;
    text-transform: uppercase;
    letter-spacing: 5px;
    font-weight: bold;
    position: relative;
    transition: all 0.4s;
    overflow: hidden;
}

.btn:focus{
    outline: none;
}

.btn::before{
    content: "";
    position: absolute;
    height: 100%;
    width: 100%;
    background-color: gold;
    top: 100%;
    left: 0;
    transition: all 0.4s;
    z-index: -1;
}

.btn:hover::before{
    transform: translateY(-100%);
}

.btn:hover {
    color: #3c3e70;
}

profile
발전하기 위한 공부

0개의 댓글