“Adsila”具有以下特定风格:
.menu–adsila {
font-size: 1.15em;
font-family: /'Nunito/', sans-serif;
}
.menu–adsila a {
color: #272727;
}
.menu–adsila .menu__item {
margin: 0 0 1em;
}
.menu–adsila .menu__item-name {
padding: 0 0.35em;
font-weight: bold;
line-height: 1.4;
transition: color 0.5s;
transition-timing-function: cubic-bezier(0.2,1,0.3,1);
}
.menu–adsila .menu__item-name::before {
content: /'/';
position: absolute;
z-index: -1;
width: 100%;
height: 50%;
left: 0;
bottom: 0;
opacity: 0.3;
transform: scale3d(0,1,1);
transform-origin: 0% 50%;
transition: transform 0.5s;
transition-timing-function: cubic-bezier(0.2,1,0.3,1);
}
.menu–adsila .menu__item-label {
font-size: 1em;
letter-spacing: 0.05em;
transform: translate3d(-0.5em,0,0);
transition: transform 0.5s, color 0.5s;
transition-timing-function: cubic-bezier(0.2,1,0.3,1);
}
.menu–adsila .menu__item-label::before {
content: /'/';
position: absolute;
z-index: -1;
width: 25%;
height: 1px;
left: 0.05em;
top: 1.25em;
opacity: 0.3;
transform: scale3d(0,1,1);
transform-origin: 100% 50%;
transition: transform 0.5s;
transition-timing-function: cubic-bezier(0.2,1,0.3,1);
}
.menu–adsila .menu__item:nth-child(odd) .menu__item-name::before,
.menu–adsila .menu__item:nth-child(odd) .menu__item-label::before {
background: #fe628e;
}
.menu–adsila .menu__item:nth-child(even) .menu__item-name::before,
.menu–adsila .menu__item:nth-child(even) .menu__item-label::before {
background: #6265fe;
}
/* Hover */
.menu–adsila .menu__item:nth-child(odd):hover,
.menu–adsila .menu__item:nth-child(odd):focus {
color: #fe628e;
}
.menu–adsila .menu__item:nth-child(even):hover,
.menu–adsila .menu__item:nth-child(even):focus {
color: #6265fe;
}
.menu–adsila .menu__item:hover .menu__item-name::before,
.menu–adsila .menu__item:focus .menu__item-name::before,
.menu–adsila .menu__item:hover .menu__item-label::before,
.menu–adsila .menu__item:focus .menu__item-label::before {
transform: scale3d(1,1,1);
}
.menu–adsila .menu__item:hover .menu__item-label,
.menu–adsila .menu__item:focus .menu__item-label {
transform: translate3d(0,0,0);
}
.menu–adsila .menu__item:hover .menu__item-label::before,
.menu–adsila .menu__item:focus .menu__item-label::before {
transition-timing-function: ease;
transform-origin: 0% 50%;
}
我们通过稍微移动标签并在标签上显示一条线,为效果添加了一些细微的变化。如您所见,我们不会为每个项目使用不同的颜色,而是区分偶数和奇数。
我们希望您喜欢这些风格,并把他使用在你的网站建设项目上。
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/259349.html