На данный момент код выглядит следующим образом:
Код: Выделить всё
.nav-list ul li{
padding-top: 3px;
padding-left: 0;
margin-left: 0;
color: white;
list-style: none;
font-family: serif;
font-weight: bold;}
@keyframes select{ /*5px to the right, should stay there */
0%{
transform: translate(0, 0);
}
100%{
transform: translate(5px, 0);
}
}
@keyframes deselect{ /*return to position*/
0%{
transform: translate(5px, 0);
}
100%{
transform: translate(0, 0);
}
}
.nav-list ul li:hover{
overflow-x: auto;
animation-name: select;
animation-timing-function: ease-out;
animation-duration: 350ms;
animation-iteration-count: initial;
}
.nav-list ul li:not(:hover){
overflow-x: auto;
animation-name: deselect;
animation-timing-function: ease-in;
animation-duration: 350ms;
animation-iteration-count: initial;
}
[list]
[*]Option 1
[*]Option 2
[*]Option 3
[/list]
Подробнее здесь: https://stackoverflow.com/questions/787 ... n-pure-css
Мобильная версия