< pre class="snippet-code-css lang-css Prettyprint-override">
Код: Выделить всё
body {
height: 100vh;
margin: 0;
padding: 0;
background-color: black;
color: white;
}
nav {
display: flex;
padding: 1em;
justify-content: space-between;
align-items: center;
}
nav ul {
display: flex;
list-style-type: none;
gap: 1.5em;
font-family: sans-serif;
}
nav button {
border: none;
background-color: blue;
color: whitesmoke;
padding: .5em 1.5em;
font-size: 18px;
border-radius: .5em;
}
nav ul li {
position: relative;
color: white;
/* color: black; */
display: inline-block;
padding: 0 8px;
cursor: pointer;
}
nav ul li span {
/* display: block; */
position: absolute;
border-bottom: 3px solid blue;
/* z-index: -1; */
border-radius: 20px;
opacity: 0;
transform: scale(0) translateY(30px);
top: 0;
left: 0;
height: 100%;
width: 100%;
transition: 1s;
background-color: transparent;
padding: 3px;
/* margin: ; */
}
/* Now For Hover Effects */
nav ul li:hover span {
opacity: 1;
transform: scale(1) translateY(0);
}
/* now animation effect for logo */
nav .Logo {
/* position: absolute; */
display: block;
animation-name: ScaleAnimtions;
animation-duration: 1s;
animation-iteration-count: infinite;
animation-timing-function: ease-in-out;
}
@keyframes ScaleAnimtions {
0% {
transform: scale(1);
}
50% {
transform: scale(1.3);
}
100% {
transform: scale(1);
}
}
Код: Выделить всё
Logo
[list]
[*]Home
[*]About
[*]Contact
[*]Services
[/list]
Sign Up
Подробнее здесь: https://stackoverflow.com/questions/787 ... ll-devices