odin-simple-mobile-menu/style.css

94 lines
1.8 KiB
CSS
Raw Normal View History

2024-02-19 10:37:52 +00:00
.menu {
position: relative;
width: max-content;
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}
.btn-menu {
background-color: rgb(90, 157, 211);
color: #fff;
font-size: 1.4rem;
padding: 12px;
border-radius: 10px;
cursor: pointer;
border: 1px solid rgb(64, 134, 193);
outline: none;
transition: 0.08s background-color ease-in-out;
display: flex;
align-items: center;
justify-content: center;
}
.btn-menu svg {
padding: 0;
margin: 0;
}
.btn-menu:hover {
background-color: rgb(92, 165, 224);
}
.btn-menu:active {
background-color: rgb(86, 158, 218);
}
.menu-fullscreen {
position: fixed;
top: 0;
left: 0;
height: 100dvh;
width: 100vw;
border: 1px solid #ccc;
color: #666;
left: 0;
font-size: 1.2rem;
text-align: left;
box-sizing: border-box;
padding: 4px;
border-radius: 10px;
transition: transform 0.5s ease-in-out;
z-index: 10;
background-color: #fff;
background: radial-gradient(#eee, #bbb);
display: flex;
justify-content: center;
align-items: center;
}
.menu-fullscreen ul {
display: flex;
flex-direction: column;
list-style: none;
margin: 0;
text-align: center;
font-size: 1.8rem;
padding: 0;
width: 100%;
}
.menu-fullscreen li {
cursor: pointer;
transition: 0.1s color ease-in-out;
padding: 18px;
background: #cccccc33;
transition: all 0.15s ease-in-out;
}
.menu-fullscreen li + li {
border-top: 1px solid #aaaaaaaa;
}
.menu-fullscreen li:hover {
background: #cecece55;
color: #444;
}
.hidden {
transform: translateY(-100dvh);
}
.close-btn-menu {
position: absolute;
top: 12px;
right: 12px;
}