html5页面头部不动,HTML5响应式粘性(固定在页面头部)滑块导航菜单模板

CSS

语言:

CSSSCSS

确定

body {

font-family: "Century Gothic", "Lato", sans-serif;

}

a {

text-decoration: none;

}

.et-header {

display: -webkit-box;

display: -ms-flexbox;

display: flex;

-webkit-box-orient: horizontal;

-webkit-box-direction: normal;

-ms-flex-direction: row;

flex-direction: row;

-webkit-box-pack: justify;

-ms-flex-pack: justify;

justify-content: space-between;

-webkit-box-align: center;

-ms-flex-align: center;

align-items: center;

position: fixed;

top: 0;

left: 0;

right: 0;

padding: 0 2em;

height: 75px;

z-index: 2;

-webkit-transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);

transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);

}

.et-header--scrolled {

background: #fff;

box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);

}

.et-header--move-up {

-webkit-transform: translateY(-75px);

transform: translateY(-75px);

-webkit-transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);

transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);

}

.et-header__logo {

color: #000;

}

.et-header__link {

margin-left: 1em;

color: #000;

}

.et-hero-tabs,

.et-slide {

display: -webkit-box;

display: -ms-flexbox;

display: flex;

-webkit-box-orient: vertical;

-webkit-box-direction: normal;

-ms-flex-direction: column;

flex-direction: column;

-webkit-box-pack: center;

-ms-flex-pack: center;

justify-content: center;

-webkit-box-align: center;

-ms-flex-align: center;

align-items: center;

height: 100vh;

position: relative;

background: #eee;

text-align: center;

padding: 0 2em;

}

.et-hero-tabs h1,

.et-slide h1 {

font-size: 2rem;

margin: 0;

letter-spacing: 1rem;

}

.et-hero-tabs h3,

.et-slide h3 {

font-size: 1rem;

letter-spacing: 0.3rem;

opacity: 0.6;

}

.et-hero-tabs-container {

display: -webkit-box;

display: -ms-flexbox;

display: flex;

-webkit-box-orient: horizontal;

-webkit-box-direction: normal;

-ms-flex-direction: row;

flex-direction: row;

position: absolute;

bottom: 0;

width: 100%;

height: 75px;

box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);

background: #fff;

z-index: 1;

-webkit-transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);

transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);

}

.et-hero-tabs-container--top-first {

position: fixed;

top: 75px;

-webkit-transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);

transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);

}

.et-hero-tabs-container--top-second {

position: fixed;

top: 0;

}

.et-hero-tab {

display: -webkit-box;

display: -ms-flexbox;

display: flex;

-webkit-box-pack: center;

-ms-flex-pack: center;

justify-content: center;

-webkit-box-align: center;

-ms-flex-align: center;

align-items: center;

-webkit-box-flex: 1;

-ms-flex: 1;

flex: 1;

color: #000;

letter-spacing: 0.1rem;

-webkit-transition: all 0.5s ease;

transition: all 0.5s ease;

font-size: 0.8rem;

}

.et-hero-tab:hover {

color: white;

background: rgba(102, 177, 241, 0.8);

-webkit-transition: all 0.5s ease;

transition: all 0.5s ease;

}

.et-hero-tab-slider {

position: absolute;

bottom: 0;

width: 0;

height: 6px;

background: #66B1F1;

-webkit-transition: left 0.3s ease;

transition: left 0.3s ease;

}

@media (min-width: 800px) {

.et-hero-tabs h1,

.et-slide h1 {

font-size: 3rem;

}

.et-hero-tabs h3,

.et-slide h3 {

font-size: 1rem;

}

.et-hero-tab {

font-size: 1rem;

}

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值