CSS 로 버튼 누르는 효과 주기

ahncheer·2023년 7월 7일
0

이것저것공부

목록 보기
6/8

출처 (참고한 사이트) :
https://www.ravelry.com/account/login?return_to=/invitations

코드 작성

1) HTML

<div class="click-btn">
    <button type="submit">Log In</button>
</div>

2) CSS


.click-btn{
    position: absolute;
}
.click-btn button {
    height: 50px;
    width: fit-content;
    margin: -4px 0 0 -4px;
    padding: 0px 16px;
    
    display: inline-block;
    box-shadow: 4px 4px 0 0 #333;
    border: 1px solid #333;
    background-color: #fff990;
    text-decoration: none;

    font-size: 14px;
    white-space: nowrap;
    color: #333;
}

.click-btn button:active{
    box-shadow: none;
    margin: 0;
}

3) 화면 확인

profile
개인 공부 기록용.

0개의 댓글