Notice
Recent Posts
Recent Comments
«   2024/09   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
Archives
Today
In Total
관리 메뉴

A Joyful AI Research Journey🌳😊

Bootstrap: toggle bar 우측 고정: ms-auto 사용하기 본문

💻Bootcamp Self-Study Revision✨/HTML5, CSS, Bootstrap, JSP

Bootstrap: toggle bar 우측 고정: ms-auto 사용하기

yjyuwisely 2023. 5. 9. 14:47

다른 사이트들을 개발자 도구로 휴대폰 크기로 보면 
햄버거 아이콘이라고 불리는 toggle bar가 우측으로 고정되어있었다.

Bootstrap의 ms-auto class로 간편하게 우측 고정으로 만들 수 있다.

전체 코드)
button에 ms-auto class를 추가했다.

<button class="navbar-toggler ms-auto" type="button"
    data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent"
    aria-controls="navbarSupportedContent" aria-expanded="false"
    aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
</button>

결과) 토글 바가 우측으로 고정된다.

아이폰 12 프로로 봤을 때

728x90
반응형
Comments