본문 바로가기
Web/HTML | CSS|JAVASCRIPT

hover를 이용한 메뉴바 menubar (HTML, CSS)

by 싸공 2020. 7. 15.
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
body{
    background-color:black;
    text-aligncenter;
}
nav{
    positionabsolute;
    width:100%;
    top50%;
    left50%;
    transformtranslate(-50%-50%);
}
.box{
    text-decorationnone;
    color : #FFB6C1;
    backgroundtransparent;
    padding20px 30px;
    border-radius10px;
    font-weightbold;
    text-transformuppercase;
    transitionall 0.1s ease-in-out;
    border2px solid #FFB6C1;
    margin:  0 10px ;
}
.box:hover{
    border:0;
    box-shadow0 0 4px #32F1FF0 0 6px #32F1FF0 0 15px #32F1FF;
}
</style>
<body>
    <nav>
        <a href="#" class="box">menu1 </a>
        <a href="#" class="box">menu2 </a>
        <a href="#" class="box">menu3 </a>
        <a href="#" class="box">menu4 </a>
        <a href="#" class="box">menu5 </a>
    </nav>

    
</body>
</html>