استایل زیبا برای منوی خطی - Line Menu ( نمونه 21)

خرید بک لینک

*,

*:after,

*:before {

-webkit-box-sizing: border-box;

box-sizing: border-box;

}

body {

font-family: 'Avenir Next', Avenir, 'Helvetica Neue', 'Lato', 'Segoe UI', Helvetica, Arial, sans-serif;

color: #444;

background: #fff;

-webkit-font-smoothing: antialiased;

-moz-osx-font-smoothing: grayscale;

}

a {

text-decoration: none;

color: #4e3c3e;

outline: none;

}

a:hover,

a:focus {

color: #f48b95;

}

#container {

width: 700px;

margin: 100px auto;

}

/* Common styles for all menus */

.menu {

line-height: 1;

margin: 0 auto 3em;

}

.menu__list {

position: relative;

display: -webkit-flex;

display: flex;

-webkit-flex-wrap: wrap;

flex-wrap: wrap;

margin: 0;

padding: 0;

list-style: none;

}

.menu__item {

display: block;

margin: 1em 0;

}

.menu__link {

font-size: 1.05em;

font-weight: bold;

display: block;

padding: 1em;

cursor: pointer;

-webkit-user-select: none;

-moz-user-select: none;

-ms-user-select: none;

user-select: none;

-webkit-touch-callout: none;

-khtml-user-select: none;

-webkit-tap-highlight-color: rgba(0, 0, 0, 0);

}

.menu__link:hover,

.menu__link:focus {

outline: none;

}

/* Individual styles */

/* bagot (by @RplusTW) */

.menu--bagot .menu__item {

position: relative;

}

.menu--bagot .menu__link {

position: relative;

min-width: 7rem;

height: 50px;

padding: 1em 1.5em;

text-align: center;

opacity: 0.7;

color: #929292;

-webkit-transition: opacity 0.3s;

transition: opacity 0.3s;

}

.menu--bagot .menu__item::before,

.menu--bagot .menu__item::after {

content: '';

position: absolute;

z-index: -1;

top: 0;

right: 0;

bottom: 0;

left: 0;

color: #d94f5c;

border-style: solid;

-webkit-transition: -webkit-transform 0.2s cubic-bezier(1, 0.6, 0, 1);

transition: transform 0.2s cubic-bezier(1, 0.6, 0, 1);

}

.menu--bagot .menu__item::before {

border-width: 2px 0 0;

-webkit-transform: translateY(calc(100% - 2px));

transform: translateY(calc(100% - 2px));

}

.menu--bagot .menu__item::after {

right: -1px;

left: -1px; /* for border-collapse */

border-width: 0 2px;

-webkit-transform: scale(1, 0);

transform: scale(1, 0);

-webkit-transform-origin: 50% 100%;

transform-origin: 50% 100%;

}

.menu--bagot .menu__item.menu__item--current::before {

-webkit-transform: translate(0, 0);

transform: translate(0, 0);

-webkit-transition-timing-function: cubic-bezier(1, 0.6, 0, 1.22);

transition-timing-function: cubic-bezier(1, 0.6, 0, 1.22);

}

.menu--bagot .menu__item.menu__item--current::after {

-webkit-transform: scale(1);

transform: scale(1);

-webkit-transition-timing-function: cubic-bezier(1, 0.6, 0, 1.22);

transition-timing-function: cubic-bezier(1, 0.6, 0, 1.22);

}

.menu--bagot .menu__item--current .menu__link,

.menu--bagot .menu__link:hover,

.menu--bagot .menu__link:focus {

opacity: 1;

}

.menu--bagot .menu__item--current .menu__link {

color: #d94f5c;

}

@media screen and (max-width:55em) {

.menu--bagot .menu__item {

margin: 0;

}

.menu--bagot .menu__item::before {

border-width: 0 2px 0 0;

-webkit-transform: translateX(calc(2px - 100%));

transform: translateX(calc(2px - 100%));

}

.menu--bagot .menu__item::after {

top: -1px;

right: 0;

bottom: -1px;

left: 0;

border-width: 2px 0;

-webkit-transform: scale(0, 1);

transform: scale(0, 1);

-webkit-transform-origin: 0% 50%;

transform-origin: 0% 50%;

}

}

سون لرن • آموزش...

ما را در سایت سون لرن • آموزش دنبال می‌کنید

برچسب: نویسنده: استخدام کار بازدید: 243 تاريخ: شنبه 7 فروردين 1395 ساعت: 22:34

صفحه بندی

خبرنامه