- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个单击菜单将使用 TimelineMax 启动动画。当我单击菜单时,它会正确启动菜单和动画。即使关闭时动画也会正确触发。但是,我注意到当动画完成并且菜单被“隐藏”时,菜单实际上并没有隐藏,而是覆盖了网站。发生这种情况时,页面上的任何链接都无法单击,因为菜单结构覆盖了它。例如,我从两个面板中删除了动画,而动画仍然存在于其他所有面板上。您将看到,当您加载 jsfiddle 时,除了菜单按钮之外,您看不到任何链接。单击菜单按钮后,将显示菜单。当您关闭它时,您会看到“联系人”和“关注”仍然存在。但是,即使您看不到其他按钮,它们仍然存在。
当您单击具有打开的隐藏导航容器类的菜单时,我尝试了一些变体,但这不起作用。所以根据我的代码,菜单在关闭时不再可见。
更新导航链接控制动画,但为了显示您想要的,我的意思是我删除了导航链接并放置了导航链接1。
$(document).ready(function(Circ) {
"use strict";
$('.nav-container').addClass('hidden');
var blocks = $('.block-reveal'),
menuButton = $('.hamburger'),
menuLinks = $('.nav-link');
var blockAnimation = new TimelineMax({
paused: true,
reversed: true
});
blockAnimation.staggerTo(blocks, 0.4, {
width: '100%',
ease: Circ.easeInOut
}, 0.08).staggerFromTo(menuLinks, 0.7, {
y: 20,
autoAlpha: 0,
ease: Circ.easeInOut
}, {
y: 0,
autoAlpha: 1
}, 0.1);
menuButton.click(function() {
blockAnimation.reversed() ? blockAnimation.play() : blockAnimation.reverse();
$('.hamburger').toggleClass('opened');
$("a.header-logo").toggleClass('header-logo-open');
$(".start-project").toggleClass('start-project-black');
$('.header-logo-open').fadeIn(1000);
$('.nav-container').removeClass('hidden');
});
});
/*--------------------------------------------------------------
# Elements
--------------------------------------------------------------*/
html {
box-sizing: border-box;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
body {
background: #FFF;
}
blockquote, q {
quotes: "" "";
}
blockquote:before, blockquote:after, q:before, q:after {
content: "";
}
/*--------------------------------------------------------------
# Clearings
--------------------------------------------------------------*/
.clear:before,
.clear:after,
.entry-content:before,
.entry-content:after,
.comment-content:before,
.comment-content:after,
.site-header:before,
.site-header:after,
.site-content:before,
.site-content:after,
.site-footer:before,
.site-footer:after {
content: "";
display: table;
table-layout: fixed;
}
.clear:after,
.entry-content:after,
.comment-content:after,
.site-header:after,
.site-content:after,
.site-footer:after {
clear: both;
}
/*HEADER / MENU
--------------------------------------------------------------------------------------------------------------
============================================================================================================*/
.main-header .header-logo {
float: left
}
.main-header {
position: fixed;
top: 0;
left: 0;
width: 100%;
padding: 30px;
z-index: 100;
}
.header-logo {
display: block;
float: left;
width: 150px;
height: 100px;
overflow: hidden;
text-indent: -9999em;
pointer-events: auto;
}
a.header-logo {
background: url(lib/img/fe-logo.svg) no-repeat;
}
a.header-logo-open {
background: url(lib/img/fe-logo-black.svg) no-repeat;
display: none;
}
a.start-project {position: absolute; right: 6%; color: #FFF; text-decoration: none; font-size: .9em}
a.start-project-black {position: absolute; right: 6%; color: #000; text-decoration: none; font-size: .9em}
nav {
width: 100vw;
z-index: 90;
position: relative;
}
.menu {
background: #FFF;
position: fixed;
padding: 20px 30px;
top: 50px;
right: 20px;
z-index: 100;
}
.block-reveal {
background:rgba(255,255,255,1.00);
height: 100vh;
position: fixed;
}
#block__01 {
right: 0%;
}
.nav-container {
position: fixed;
width: 80%;
left: 10%;
top: 20%;
text-align: left;
}
ul.main-menu {width:60%}
ul.main-menu, ul.small-menu {
list-style-type: none;
margin: 0;
padding: 0;
}
ul.small-menu {
margin-top: 1em;
width: 80%;
}
p.follow_title {
color: #262626;
margin-top: .4em;
}
@media (max-width:800px){ul.small-menu {width: 100%;}p.follow_title {margin-top: .2em;}}
ul.main-menu li {
font-size: 6em;
line-height: .9em
}
@media (max-height:800px){.nav-container {top: 15%;}ul.main-menu li {font-size: 4em;}}
@media (max-width:800px) {.nav-container {top: 30%;}ul.main-menu li {font-size: 4em;}}
ul.main-menu li a {
font-weight: 800;
color: #101317;
text-transform: uppercase;
text-decoration: none
}
ul.main-menu li a:before{
content: '';
width: 0%;
height: 15px;
background: #101317;
position: absolute;
top: 40px;
left: -5px;
transition-timing-function: cubic-bezier(.8,.09,1,.44);
transition-delay: 400ms;
transition: all 600ms cubic-bezier(1, 0, 0, 1) 0ms;
}
ul.main-menu li a:hover:before{
content: '';
width: 100%;
height: 15px;
position: absolute;
top: 40px;
left: -5px;
z-index: -1;
}
@media (max-height:800px){ul.main-menu li a:before{top: 25px;}ul.main-menu li a:hover:before{top: 25px;}}
.project-thumb {
position: relative;
display: inline-block;
overflow: hidden;
margin: 1px;
width: 32%;
height: 200px;
background-color: #000000;
color: #ffffff;
text-align: left;
}
.project-thumb * {
-webkit-transition: all 0.35s;
transition: all 0.35s;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.project-thumb img {
max-width: 100%;
width: 100%;
vertical-align: top;
}
.project-thumb div {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
padding: 20px;
background-image: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
background-image: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
display: flex;
flex-direction: column;
justify-content: flex-end;
}
.project-thumb h4 {
font-size: 1.3em;
text-transform: uppercase;
font-weight: 900;
line-height: 1;
letter-spacing: 1px;
margin: 3px 0;
}
.project-thumb a {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
.project-thumb:hover img,
.project-thumb.hover img {
-webkit-transform: scale(1.3) rotate(5deg);
transform: scale(1.3) rotate(5deg);
}
ul.small-menu li a:hover, ul.project-menu li a:hover {
color: #f15c57;
}
ul.small-menu li {
float: left;
padding-right: .8em;
}
ul.small-menu li a {
text-decoration: none;
color: #4e4d4d;
font-size: 2em;
}
ul.project-menu {
padding-top: 2em;
margin: 0;
position: fixed;
bottom: 0;
width: 80%
}
@media (max-height:600px){ul.project-menu {display: none}}
@media (max-width:800px){ul.project-menu {display: none}}
ul.project-menu li {
list-style: none;
padding-bottom: .6em
}
ul.project-menu p {font-size: 1.3em; font-weight: 900;}
#particle-canvas {
width: 100%;
height: 100%;
}
ul.project-menu li a {
text-decoration: none;
color: #4e4d4d;
}
.hamburger {
width: 30px;
height: 45px;
position: absolute;
right: 3%;
margin-left: -25px;
top: 34%;
margin-top: -22.5px;
cursor: pointer;
}
.hamburger span {
display: block;
position: absolute;
height: 1px;
width: 100%;
background: #FFF none repeat scroll 0% 0%;
opacity: 1;
right: 0px;
transition: all 0.25s ease-in-out 0s;
transform: rotate(0deg);
}
.hamburger span:nth-child(1) {
margin-top: 0px;
}
.hamburger span:nth-child(2) {
margin-top: 8px;
margin-right: 0px;
}
.hamburger span:nth-child(3) {
margin-top: 16px;
}
.hamburger.opened span:nth-child(1) {
transform: rotate(135deg);
margin-top: 16px;
}
.hamburger.opened span:nth-child(2) {
opacity: 0;
right: -75px;
}
.hamburger.opened span:nth-child(3) {
transform: rotate(-135deg);
margin-top: 16px;
}
.hamburger.opened span {
background: #f15c57 none repeat scroll 0% 0%;
}
.icon
{
width: 45px;
height: 45px;
display: block;
margin: 0 auto
}
@media (max-width:800px){.icon
{
width: 35px;
height: 35px;
display: block;
margin: 0 auto
}}
.icon-facebook,
.icon-twitter,
.icon-linkedin{
fill: #262626;
}
.icon-facebook {width: 30px}
.icon-facebook :hover {
fill: #3b5998;
}
.icon-twitter :hover {
fill: #00acee;
}
.icon-linkedin :hover {
fill: #007fb2;
}
/*BODY
--------------------------------------------------------------------------------------------------------------
============================================================================================================*/
.right-v {
position: absolute;
top: 50%;
right: 0;
transform: rotate(90deg);
transform-origin: left top 0;
z-index: 1;
}
@media (max-width:800px) {
.right-v {
display: none;
}
}
.lb {
color: #FFF;
}
.pd {
font-family: 'Gilda Display', serif;
}
#wwa {
font-size: .7em;
text-transform: uppercase
}
.hidden, .show-mobile {
display: none;
}
/*FOOTER
--------------------------------------------------------------------------------------------------------------
============================================================================================================*/
footer.home-footer {
position: fixed;
bottom: 0;
right: 2%;
z-index: 1;
}
.bottom-panel {
color: #FFF;
font-size: .9em
}
.bottom-panel ul {
list-style: none;
padding: 0;
margin: 0;
}
.bottom-panel ul li {
display: inline-block;
margin: 0;
}
.call {
padding-bottom: .5em;
}
li.social a {
border-bottom: 4px solid #FFF;
padding: 0 .5em 0em .5em;
color: #FFF;
text-decoration: none
}
li.social a:hover {
border-bottom: 4px solid #f15c57;
}
li.social:nth-child(2) {
margin-left: 1em !important;
}
/*HOME PANEL
--------------------------------------------------------------------------------------------------------------
============================================================================================================*/
.overlay {background: #101317; position: relative; width: 100%; height: 100vh;}
.container-fluid {
margin-left: auto;
margin-right: auto;
overflow: hidden;
}
.banner-container {
top: 0;
left: 0;
width: 100%;
height: 100%;
overflow: hidden;
z-index: -100;
}
span.left-panel-load {
position: absolute;
top: 65%;
left: 2%;
transform: rotate(270deg);
transform-origin: left top 0;
z-index: 9;
text-transform: uppercase;
color: #FFF;
font-weight: bold;
font-family: 'Lato', sans-serif;
font-size: .7em;
letter-spacing: .1em;
}
.slider-wrapper, .slider-inner {
position: absolute;
height: 100%;
width: 100%;
}
#finalelements {
background: url(lib/img/home-banner.jpg) no-repeat center center;
width: 100%;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
.slider-content {
position: relative;
width: 40%;
max-width: 500px;
left: 50%;
top: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
font-family: 'Lato', sans-serif;
border-style: solid;
border-width: 70px;
border-image: url(lib/img/border.png) 60 round;
}
.slider-content h1, .slider-content h3 {
font-family: 'Lato', sans-serif;
text-transform: uppercase;
}
.slider-content h1 {
font-size: 6em;
line-height: .8em;
margin: 0;
font-weight: 900 !important;
color: #ef0c33;
}
.slider-content h1 strong { color: #FFF;}
.slider-content h3 {font-weight: 300; margin-top: .8em}
.slider-content h3 {
line-height: .7em;
}
.slider-content p {
padding-top: 2em;
width: 90%;
}
.slider-content h4 {
padding-top: 2em;
font-family: 'Lato', sans-serif;
text-transform: uppercase;
font-weight: 100;
}
.distress {
background: url(lib/img/texture.png);
width: 95%;
height: 95%;
position: absolute;
top: 0;
}
.red-line {
width: 25%;
height: 1px;
background: #f0625d;
background: -moz-linear-gradient(left, transparent 0%, #ad1f23 100%);
background: -webkit-linear-gradient(left, transparent 0%, #ad1f23 100%);
background: linear-gradient(to right, transparent 0%, #ad1f23 100%);
filter: progid: DXImageTransform.Microsoft.gradient( startColorstr='transparent', endColorstr='#ad1f23', GradientType=1);
position: absolute;
top: 50%;
margin-left: 1em;
}
@media (max-width:800px) {
.slider-content, .slider-content p {width: 80%}
.slider-content h1 { font-size: 5em;}
}
.hp-content {padding: 7em; display: block;}
.hp-inner {width: 60% !important; margin: 0 auto;}
.hp-inner img {width: 20%;}
.hp-inner h2 {line-height: 1em; font-size: 4em;}
.hp-inner h2::after {
content:"";
display: block;
height: 0.1em;
vertical-align: bottom;
width: 20%;
background: #ef0c33;
margin: 1em 0 1em 0;
}
.hp-image {background: url(lib/img/capital.jpg)no-repeat center center;
width: 100%;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;}
.hp-inner ul { list-style: none; margin: 0; padding: 0;}
.hp-inner ul li { display: inline-block; padding: 1em 2em 1em 0;}
.hp-inner ul li p {font-size: .8em;}
.hp-inner ul li a {background: #ef0c33; color: #FFF; text-decoration: none; padding: .6em}
.center {text-align: center}
.dark-bg {background: #e3e3e3; display: block; position: relative; padding: 5em 0 5em 0}
.service-panel h2 {text-align: center; margin-bottom: 1em}
.service-panel h2::after {
content:"";
display: block;
height: 0.1em;
vertical-align: bottom;
width: 10%;
background: #ef0c33;
margin: 0 auto;
}
.service-panel p {text-align: center}
.service-panel span {font-weight: 900; font-size: 3em;}
.service-grid {padding: 2em;}
.service-grid h4 {font-weight: 900; font-size: 1.3em}
.service-grid p {font-size: .9em; margin-top: .8em}
.nav-up {
top: -40px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.13.1/TweenMax.min.js"></script>
<div class="bg">
</div>
<header class="main-header">
<div class="header-menu">
<div class="hamburger">
<p>Menu</p>
</div>
</div>
</header>
<nav class="main-nav">
<div class="block-reveal" id="block__01"></div>
<div class="nav-container">
<ul class="main-menu">
<li class="nav-link"><a href="#">Agency</a></li>
<li class="nav-link"><a href="#">Work</a></li>
<li class="nav-link"><a href="#">Services</a></li>
<li class="nav-link1"><a href="#">Contact</a></li>
</ul>
<ul class="small-menu nav-link1">
<li><p class="follow_title h3">Follow Us</p></li>
<li><a href="#0"><svg class="icon icon-facebook"><use xlink:href="#facebook"/></svg></a></li>
<li><a href="#0"><svg class="icon icon-twitter"><use xlink:href="#twitter"/></svg></a></li>
<li><a href="#0"><svg class="icon icon-linkedin"><use xlink:href="#linkedin"/></svg></a></li>
</ul>
</div>
</nav>
</div>
最佳答案
在 onReverseComplete
上添加 blockAnimation.eventCallback
并在回调时隐藏导航
$(document).ready(function(Circ) {
"use strict";
$('.nav-container').addClass('hidden');
var blocks = $('.block-reveal'),
menuButton = $('.hamburger'),
menuLinks = $('.nav-link');
var blockAnimation = new TimelineMax({
paused: true,
reversed: true
});
blockAnimation.staggerTo(blocks, 0.4, {
width: '100%',
ease: Circ.easeInOut
}, 0.08).staggerFromTo(menuLinks, 0.7, {
y: 20,
autoAlpha: 0,
ease: Circ.easeInOut
}, {
y: 0,
autoAlpha: 1
}, 0.1);
menuButton.click(function() {
blockAnimation.reversed() ? blockAnimation.play() : blockAnimation.reverse();
$('.hamburger').toggleClass('opened');
$("a.header-logo").toggleClass('header-logo-open');
$(".start-project").toggleClass('start-project-black');
$('.header-logo-open').fadeIn(1000);
$('.nav-container').removeClass('hidden');
});
blockAnimation.eventCallback("onReverseComplete", function(e){
$('.nav-container').addClass('hidden');
});
});
/*--------------------------------------------------------------
# Elements
--------------------------------------------------------------*/
html {
box-sizing: border-box;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
body {
background: #FFF;
}
blockquote, q {
quotes: "" "";
}
blockquote:before, blockquote:after, q:before, q:after {
content: "";
}
/*--------------------------------------------------------------
# Clearings
--------------------------------------------------------------*/
.clear:before,
.clear:after,
.entry-content:before,
.entry-content:after,
.comment-content:before,
.comment-content:after,
.site-header:before,
.site-header:after,
.site-content:before,
.site-content:after,
.site-footer:before,
.site-footer:after {
content: "";
display: table;
table-layout: fixed;
}
.clear:after,
.entry-content:after,
.comment-content:after,
.site-header:after,
.site-content:after,
.site-footer:after {
clear: both;
}
/*HEADER / MENU
--------------------------------------------------------------------------------------------------------------
============================================================================================================*/
.main-header .header-logo {
float: left
}
.main-header {
position: fixed;
top: 0;
left: 0;
width: 100%;
padding: 30px;
z-index: 100;
}
.header-logo {
display: block;
float: left;
width: 150px;
height: 100px;
overflow: hidden;
text-indent: -9999em;
pointer-events: auto;
}
a.header-logo {
background: url(lib/img/fe-logo.svg) no-repeat;
}
a.header-logo-open {
background: url(lib/img/fe-logo-black.svg) no-repeat;
display: none;
}
a.start-project {position: absolute; right: 6%; color: #FFF; text-decoration: none; font-size: .9em}
a.start-project-black {position: absolute; right: 6%; color: #000; text-decoration: none; font-size: .9em}
nav {
width: 100vw;
z-index: 90;
position: relative;
}
.menu {
background: #FFF;
position: fixed;
padding: 20px 30px;
top: 50px;
right: 20px;
z-index: 100;
}
.block-reveal {
background:rgba(255,255,255,1.00);
height: 100vh;
position: fixed;
}
#block__01 {
right: 0%;
}
.nav-container {
position: fixed;
width: 80%;
left: 10%;
top: 20%;
text-align: left;
}
ul.main-menu {width:60%}
ul.main-menu, ul.small-menu {
list-style-type: none;
margin: 0;
padding: 0;
}
ul.small-menu {
margin-top: 1em;
width: 80%;
}
p.follow_title {
color: #262626;
margin-top: .4em;
}
@media (max-width:800px){ul.small-menu {width: 100%;}p.follow_title {margin-top: .2em;}}
ul.main-menu li {
font-size: 6em;
line-height: .9em
}
@media (max-height:800px){.nav-container {top: 15%;}ul.main-menu li {font-size: 4em;}}
@media (max-width:800px) {.nav-container {top: 30%;}ul.main-menu li {font-size: 4em;}}
ul.main-menu li a {
font-weight: 800;
color: #101317;
text-transform: uppercase;
text-decoration: none
}
ul.main-menu li a:before{
content: '';
width: 0%;
height: 15px;
background: #101317;
position: absolute;
top: 40px;
left: -5px;
transition-timing-function: cubic-bezier(.8,.09,1,.44);
transition-delay: 400ms;
transition: all 600ms cubic-bezier(1, 0, 0, 1) 0ms;
}
ul.main-menu li a:hover:before{
content: '';
width: 100%;
height: 15px;
position: absolute;
top: 40px;
left: -5px;
z-index: -1;
}
@media (max-height:800px){ul.main-menu li a:before{top: 25px;}ul.main-menu li a:hover:before{top: 25px;}}
.project-thumb {
position: relative;
display: inline-block;
overflow: hidden;
margin: 1px;
width: 32%;
height: 200px;
background-color: #000000;
color: #ffffff;
text-align: left;
}
.project-thumb * {
-webkit-transition: all 0.35s;
transition: all 0.35s;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.project-thumb img {
max-width: 100%;
width: 100%;
vertical-align: top;
}
.project-thumb div {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
padding: 20px;
background-image: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
background-image: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
display: flex;
flex-direction: column;
justify-content: flex-end;
}
.project-thumb h4 {
font-size: 1.3em;
text-transform: uppercase;
font-weight: 900;
line-height: 1;
letter-spacing: 1px;
margin: 3px 0;
}
.project-thumb a {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
.project-thumb:hover img,
.project-thumb.hover img {
-webkit-transform: scale(1.3) rotate(5deg);
transform: scale(1.3) rotate(5deg);
}
ul.small-menu li a:hover, ul.project-menu li a:hover {
color: #f15c57;
}
ul.small-menu li {
float: left;
padding-right: .8em;
}
ul.small-menu li a {
text-decoration: none;
color: #4e4d4d;
font-size: 2em;
}
ul.project-menu {
padding-top: 2em;
margin: 0;
position: fixed;
bottom: 0;
width: 80%
}
@media (max-height:600px){ul.project-menu {display: none}}
@media (max-width:800px){ul.project-menu {display: none}}
ul.project-menu li {
list-style: none;
padding-bottom: .6em
}
ul.project-menu p {font-size: 1.3em; font-weight: 900;}
#particle-canvas {
width: 100%;
height: 100%;
}
ul.project-menu li a {
text-decoration: none;
color: #4e4d4d;
}
.hamburger {
width: 30px;
height: 45px;
position: absolute;
right: 3%;
margin-left: -25px;
top: 34%;
margin-top: -22.5px;
cursor: pointer;
}
.hamburger span {
display: block;
position: absolute;
height: 1px;
width: 100%;
background: #FFF none repeat scroll 0% 0%;
opacity: 1;
right: 0px;
transition: all 0.25s ease-in-out 0s;
transform: rotate(0deg);
}
.hamburger span:nth-child(1) {
margin-top: 0px;
}
.hamburger span:nth-child(2) {
margin-top: 8px;
margin-right: 0px;
}
.hamburger span:nth-child(3) {
margin-top: 16px;
}
.hamburger.opened span:nth-child(1) {
transform: rotate(135deg);
margin-top: 16px;
}
.hamburger.opened span:nth-child(2) {
opacity: 0;
right: -75px;
}
.hamburger.opened span:nth-child(3) {
transform: rotate(-135deg);
margin-top: 16px;
}
.hamburger.opened span {
background: #f15c57 none repeat scroll 0% 0%;
}
.icon
{
width: 45px;
height: 45px;
display: block;
margin: 0 auto
}
@media (max-width:800px){.icon
{
width: 35px;
height: 35px;
display: block;
margin: 0 auto
}}
.icon-facebook,
.icon-twitter,
.icon-linkedin{
fill: #262626;
}
.icon-facebook {width: 30px}
.icon-facebook :hover {
fill: #3b5998;
}
.icon-twitter :hover {
fill: #00acee;
}
.icon-linkedin :hover {
fill: #007fb2;
}
/*BODY
--------------------------------------------------------------------------------------------------------------
============================================================================================================*/
.right-v {
position: absolute;
top: 50%;
right: 0;
transform: rotate(90deg);
transform-origin: left top 0;
z-index: 1;
}
@media (max-width:800px) {
.right-v {
display: none;
}
}
.lb {
color: #FFF;
}
.pd {
font-family: 'Gilda Display', serif;
}
#wwa {
font-size: .7em;
text-transform: uppercase
}
.hidden, .show-mobile {
display: none;
}
/*FOOTER
--------------------------------------------------------------------------------------------------------------
============================================================================================================*/
footer.home-footer {
position: fixed;
bottom: 0;
right: 2%;
z-index: 1;
}
.bottom-panel {
color: #FFF;
font-size: .9em
}
.bottom-panel ul {
list-style: none;
padding: 0;
margin: 0;
}
.bottom-panel ul li {
display: inline-block;
margin: 0;
}
.call {
padding-bottom: .5em;
}
li.social a {
border-bottom: 4px solid #FFF;
padding: 0 .5em 0em .5em;
color: #FFF;
text-decoration: none
}
li.social a:hover {
border-bottom: 4px solid #f15c57;
}
li.social:nth-child(2) {
margin-left: 1em !important;
}
/*HOME PANEL
--------------------------------------------------------------------------------------------------------------
============================================================================================================*/
.overlay {background: #101317; position: relative; width: 100%; height: 100vh;}
.container-fluid {
margin-left: auto;
margin-right: auto;
overflow: hidden;
}
.banner-container {
top: 0;
left: 0;
width: 100%;
height: 100%;
overflow: hidden;
z-index: -100;
}
span.left-panel-load {
position: absolute;
top: 65%;
left: 2%;
transform: rotate(270deg);
transform-origin: left top 0;
z-index: 9;
text-transform: uppercase;
color: #FFF;
font-weight: bold;
font-family: 'Lato', sans-serif;
font-size: .7em;
letter-spacing: .1em;
}
.slider-wrapper, .slider-inner {
position: absolute;
height: 100%;
width: 100%;
}
#finalelements {
background: url(lib/img/home-banner.jpg) no-repeat center center;
width: 100%;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
.slider-content {
position: relative;
width: 40%;
max-width: 500px;
left: 50%;
top: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
font-family: 'Lato', sans-serif;
border-style: solid;
border-width: 70px;
border-image: url(lib/img/border.png) 60 round;
}
.slider-content h1, .slider-content h3 {
font-family: 'Lato', sans-serif;
text-transform: uppercase;
}
.slider-content h1 {
font-size: 6em;
line-height: .8em;
margin: 0;
font-weight: 900 !important;
color: #ef0c33;
}
.slider-content h1 strong { color: #FFF;}
.slider-content h3 {font-weight: 300; margin-top: .8em}
.slider-content h3 {
line-height: .7em;
}
.slider-content p {
padding-top: 2em;
width: 90%;
}
.slider-content h4 {
padding-top: 2em;
font-family: 'Lato', sans-serif;
text-transform: uppercase;
font-weight: 100;
}
.distress {
background: url(lib/img/texture.png);
width: 95%;
height: 95%;
position: absolute;
top: 0;
}
.red-line {
width: 25%;
height: 1px;
background: #f0625d;
background: -moz-linear-gradient(left, transparent 0%, #ad1f23 100%);
background: -webkit-linear-gradient(left, transparent 0%, #ad1f23 100%);
background: linear-gradient(to right, transparent 0%, #ad1f23 100%);
filter: progid: DXImageTransform.Microsoft.gradient( startColorstr='transparent', endColorstr='#ad1f23', GradientType=1);
position: absolute;
top: 50%;
margin-left: 1em;
}
@media (max-width:800px) {
.slider-content, .slider-content p {width: 80%}
.slider-content h1 { font-size: 5em;}
}
.hp-content {padding: 7em; display: block;}
.hp-inner {width: 60% !important; margin: 0 auto;}
.hp-inner img {width: 20%;}
.hp-inner h2 {line-height: 1em; font-size: 4em;}
.hp-inner h2::after {
content:"";
display: block;
height: 0.1em;
vertical-align: bottom;
width: 20%;
background: #ef0c33;
margin: 1em 0 1em 0;
}
.hp-image {background: url(lib/img/capital.jpg)no-repeat center center;
width: 100%;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;}
.hp-inner ul { list-style: none; margin: 0; padding: 0;}
.hp-inner ul li { display: inline-block; padding: 1em 2em 1em 0;}
.hp-inner ul li p {font-size: .8em;}
.hp-inner ul li a {background: #ef0c33; color: #FFF; text-decoration: none; padding: .6em}
.center {text-align: center}
.dark-bg {background: #e3e3e3; display: block; position: relative; padding: 5em 0 5em 0}
.service-panel h2 {text-align: center; margin-bottom: 1em}
.service-panel h2::after {
content:"";
display: block;
height: 0.1em;
vertical-align: bottom;
width: 10%;
background: #ef0c33;
margin: 0 auto;
}
.service-panel p {text-align: center}
.service-panel span {font-weight: 900; font-size: 3em;}
.service-grid {padding: 2em;}
.service-grid h4 {font-weight: 900; font-size: 1.3em}
.service-grid p {font-size: .9em; margin-top: .8em}
.nav-up {
top: -40px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.13.1/TweenMax.min.js"></script>
<div class="bg">
</div>
<header class="main-header">
<div class="header-menu">
<div class="hamburger">
<p>Menu</p>
</div>
</div>
</header>
<nav class="main-nav">
<div class="block-reveal" id="block__01"></div>
<div class="nav-container">
<ul class="main-menu">
<li class="nav-link"><a href="#">Agency</a></li>
<li class="nav-link"><a href="#">Work</a></li>
<li class="nav-link"><a href="#">Services</a></li>
<li class="nav-link"><a href="#">Contact</a></li>
</ul>
<ul class="small-menu nav-link1">
<li><p class="follow_title h3">Follow Us</p></li>
<li><a href="#0"><svg class="icon icon-facebook"><use xlink:href="#facebook"/></svg></a></li>
<li><a href="#0"><svg class="icon icon-twitter"><use xlink:href="#twitter"/></svg></a></li>
<li><a href="#0"><svg class="icon icon-linkedin"><use xlink:href="#linkedin"/></svg></a></li>
</ul>
</div>
</nav>
</div>
关于javascript - 单击时菜单未关闭,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48811211/
我在选项卡中有我的网络应用程序的选项。 aaa bbb ccc ddd eee 当用户单击任何选项卡(在同一窗口中)时,我会使用此代码获得淡出效果,然后自动
如何获得一个简单的调用单击来实现如下功能:http://jsfiddle.net/ftwPS/6/我显然错过了一些基本的东西,因为当您单击“CLICK”时这不起作用。 $('tr').click(fu
我有一个列表,在左侧显示一个插入符号图标,单击它时应该更改图标。每当我单击一个图标时,所有图标都会更改。 detailedInfo = []; subordinateInfo; openSu
我有一个 div,我想对其进行设置,以便当我单击其他内容时,它会隐藏该 div。 我也是这样 $('body').click(function(){ if(loginOpened) {
我有很多装有不同内容的盒子。 如果单击第一个框,您可以看到一个包含更多详细信息的弹出框。如果单击第二个、第三个等框,您必须查看这些框的详细信息。 我的问题:如果我点击框号。 2 我看到了盒子号的详细信
当我点击 .add-btn 时,我将 .add-btn 的样式更改为 background:#cccccc 并将 val() 更改为“-”。 现在当我用 tr td .list 删除添加的文本时,它是
感谢 SO 的出色贡献者!当您开始了解 jQuery 时,它会变得更酷。 :) 所以我有一个 LI,单击时会显示/隐藏子 UL。我想做的是能够单击 LI 内的链接,打开一个空白窗口,但也不会关闭子 U
我有这份文档,它使我能够获得一份带有点击进度的多项选择选择调查问卷。 如何用图像代替此处的文字? (并且仍然有这样的机制,一旦单击[图像],就会提出下一个问题) 我已经尝试使用 UL/H1 设置背景图
我想在 JQGrid 的刷新按钮单击上编写代码。有什么事件吗? 最佳答案 如果您需要在开始刷新之前执行一些操作,您应该使用 beforeRefresh打回来: $("#grid_id").jqGrid
问题是将对象或多个参数从模板传递到组件,并使用它们将数据添加到 API。 任务.service.ts addTasks(task: Task): Observable{ let headers =
我有一个像这样的primefaces选项卡 View : This tab has static content. this t
我在 jquery 中有一个有效的 a.click() 函数...但是如果我单击一个 anchor ,我会打开一个新窗口...但是我怎样才能阻止浏览器本身打开一个新窗口? 示例: $('a')
有没有简单的方法来创建代码:如果 URL 更改或单击链接显示 div(例如加载 gif 3 秒),则显示页面?有点像空白的白色页面,加载 gif 旋转 3 秒然后显示页面? 谢谢! 最佳答案 给定 G
我需要知道此时按钮的状态是否被点击? 谢谢 最佳答案 if (myButton.state & UIControlStateHighlighted) { // Do your stuff the
我正在 NSImageView 上绘制一条 NSBezierPath 线。我正在创建 NSBezierPath 对象,设置 moveToPoint,设置 lineToPoint,设置 setLineW
我的 Selenium 代码存在问题,无法正确执行按键 + 单击操作。 测试应打开 jqueryui.com 链接并选择页面上的前 2 个 li 元素。 我正在使用 Selenium 2.23 和 F
单击时我将更改字符串一部分的样式。例如“TEXT”,然后单击“T”,之后它会将样式从黑色更改为红色,仅 T在我的代码中,当我单击文本时,我拆分文本并保留在“split”数组中,它将调用handleCl
我在网站上有一个 anchor 。当有人点击它时,我在 jquery 中执行一些操作并更改名称,但是当再次单击它时,事件被触发,尽管我已经更改了它的名称。代码在这里: $(".like_cont a[
我有一个下载链接Download我希望每次当有人点击“下载”时,我都可以将其插入数据库total_downloads+1。为了插入数据库,我通常使用 然后 if (isset($_POST['d
我是一名优秀的程序员,十分优秀!