如何改善导航,以便在调整大小时可以适应屏幕尺寸的变化

时间:2019-01-28 15:28:42

标签: navigation

我在建立网站方面还比较陌生,我正在努力了解自己做错的事情,但是请您帮忙了解我当前脚本的不正确之处以及如何改进它。如果需要,可以添加我的CSS和Java,但是如果有什么我可以纠正我的主要html布局的事情,请告诉我。

h3, p, div
body {
	margin: 0;
	padding: 0;
	font-family: Quicksand;
}

nav {
	z-index: 500;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100px;
	padding: 10px 100px;
	box-sizing: border-box;
	transition: .3s;
	display: flex;
}
nav.black {
	background: rgba(0, 0, 0,0.8);
	height: 100px;
	padding: 0px 80px;
}
nav.logo {
	padding: 22px 80px;
	height: 80px;
	float: left;
	font-size: 24px;
	transition: .3s;
}
nav.black .logo {
	color: #fff;
}
.container {
	display: flex;
}

nav ul a {
  font-size: 34px;
  margin-right: 80px;
  margin-top: 5px;
  text-decoration:none;
  font-family: Arial , sans-serif;
  color: white;

}

nav ul {
	list-style: none;
	float: right;
	margin-top: 0;
	padding: 0;
	display: flex;
	margin: 0 auto;

}
nav ul li {
	list-style: none;
	margin: 0 auto;
}
nav ul li a {
	line-height: 80px;
	color: ;
	padding: 12px 30px;
	text-decoration: none;
	text-transform: uppercase;
	transition: .3s;
}
nav.black ul li a {
	color: #fff;
}
nav ul li a:focus {
	outline: none;
}
nav ul li a.active {
	background: #E2472F;
	color: #fff;
	border-radius: 6px;
}
section.sec1 {
	width: 100%;
	height: 100vh;
	min-height: 100%;
	min-width: 1024px;
	background: url('https://carmelindustries.com/wp-content/uploads/2014/03/56123209-table-wallpapers.jpg');
	background-size: cover;
	background-position: center;
}


section.sec2 {
	width: 100%;
	height: 100vh;
	min-height: 100%;
	min-width: 1024px;
	display: flex;
	background-size: cover;
	background-position: center;
}

nav ul li a {
	text-decoration: none;
	position: relative;
	width: 60px;
	height: 60px;
	display: block;
	text-align: center;
	margin: 0px 10px;
	border-radius: 50%;
	padding: 6px;
	box-sizing: border-box;
	text-decoration: none;
	box-shadow: 0 10px 15px rgba(0, 0, 0, 0.3);
	background: linear-gradient(0deg, #ddd, #fff);
	transition: .2s;
}
nav ul li a:hover {
	text-decoration: none;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}
nav ul  a .fa {
	text-decoration: none;
	width: 100%;
	height: 100%;
	display: block;
	background: linear-gradient(0deg, #fff, #ddd);
	border-radius: 50%;
	line-height: calc(60px - 12px);
	font-size: 28px;
	color: #26262626;
	transition: .2s;
}

nav ul li:nth-child(3) a:hover .fa {
	color: #517fa4
}
nav ul li:nth-child(4) a:hover .fa {
	color: #55acee
}
nav ul li:nth-child(5) a:hover .fa {
	color: #dc4e41
}
nav ul li:nth-child(6) a:hover .fa {
	color: #0077b5
}
nav ul li:nth-child(7) a:hover .fa {
	color: #49c4a1
}
.content {
	margin-top: 80px;
}
.content h6 {
	width: 900px;
	margin: 30px auto;
	text-align: center;
	font-size: 28px;
	font-weight: 300;
	line-height: 30px;
}

.content h3 {
	width: 900px;
	margin: 30px auto;
	text-align: center;
	font-size: 28px;
	font-weight: 300;
	line-height: 30px;
}

.coderh1 h1 {
	position: absolute;
	top: 40%;
	line-height: 100px;
	height: 90px;
	font-size: 80px;
	font-weight: 100;
	width: 100%;
	text-align: center;
	color: ;
	-webkit-animation: blurFadeInOut 1s ease-in backwards;
	-moz-animation: blurFadeInOut 1s ease-in backwards;
	-ms-animation: blurFadeInOut 1s ease-in backwards;
	animation: blurFadeInOut 1s ease-in backwards;
}
.coderh1 h1 {
	-webkit-animation: blurFadeIn 2s ease-in 1s backwards;
	-moz-animation: blurFadeIn 2s ease-in 1s backwards;
	-ms-animation: blurFadeIn 2s ease-in 1s backwards;
	animation: blurFadeIn 2s ease-in 1s backwards;
	color: transparent;
	text-shadow: 0px 0px 1px white;
}
h1:hover {
	transform: ;
	transition:
}


.container {
	width: 100%;
	position: relative;
	overflow: hidden;
}
a {
	text-decoration: none;
}

.sp-container h2 {
	position: absolute;
	top: 50%;
	line-height: 100px;
	height: 90px;
	margin-top: 50px;
	font-size: 100px;
  font-weight: 200;
	width: 100%;
	text-align: center;
	color: transparent;
	-webkit-animation: blurFadeInOut 3s ease-in backwards;
	-moz-animation: blurFadeInOut 3s ease-in backwards;
	-ms-animation: blurFadeInOut 3s ease-in backwards;
	animation: blurFadeInOut 3s ease-in backwards;
}
.sp-container h2.frame-1 {
	-webkit-animation-delay: 0s;
	-moz-animation-delay: 0s;
	-ms-animation-delay: 0s;
	animation-delay: 0s;
}
.sp-container h2.frame-2 {
	-webkit-animation-delay: 3s;
	-moz-animation-delay: 3s;
	-ms-animation-delay: 3s;
	animation-delay: 3s;
}
.sp-container h2.frame-3 {
	-webkit-animation-delay: 4s;
	-moz-animation-delay: 4s;
	-ms-animation-delay: 4s;
	animation-delay: 4s;
}
.sp-container h2.frame-4 {
	font-size: 200px;
	-webkit-animation-delay: 6s;
	-moz-animation-delay: 6s;
	-ms-animation-delay: 6s;
	animation-delay: 6s;
}
.sp-container h2.frame-5 {
	-webkit-animation: none;
	-moz-animation: none;
	-ms-animation: none;
	animation: none;
	color: transparent;
	text-shadow: 0px 0px 1px #fff;
}
.sp-container h2.frame-5 span {
	-webkit-animation: blurFadeIn 3s ease-in 2s backwards;
	-moz-animation: blurFadeIn 1s ease-in 2s backwards;
	-ms-animation: blurFadeIn 3s ease-in 2s backwards;
	animation: blurFadeIn 3s ease-in 2s backwards;
	color: transparent;
	text-shadow: 0px 0px 1px #fff;
}
.sp-container h2.frame-5 span:nth-child(2) {
	-webkit-animation-delay: 3s;
	-moz-animation-delay: 3s;
	-ms-animation-delay: 1s;
	animation-delay: 3s;
}
.sp-container h2.frame-5 span:nth-child(3) {
	-webkit-animation-delay: 3s;
	-moz-animation-delay: 3s;
	-ms-animation-delay: 3s;
	animation-delay: 3s;
}


@-webkit-keyframes blurFadeInOut {
	0% {
		opacity: 0;
		text-shadow: 0px 0px 40px #fff;
		-webkit-transform: scale(1.3);
	}
	20%, 75% {
		opacity: 1;
		text-shadow: 0px 0px 1px #fff;
		-webkit-transform: scale(1);
	}
	100% {
		opacity: 0;
		text-shadow: 0px 0px 50px #fff;
		-webkit-transform: scale(0);
	}
}
@-webkit-keyframes blurFadeIn {
	0% {
		opacity: 0;
		text-shadow: 0px 0px 40px #fff;
		-webkit-transform: scale(1.3);
	}
	50% {
		opacity: 0.5;
		text-shadow: 0px 0px 10px #fff;
		-webkit-transform: scale(1.1);
	}
	100% {
		opacity: 1;
		text-shadow: 0px 0px 1px #fff;
		-webkit-transform: scale(1);
	}
}
@-webkit-keyframes fadeInBack {
	0% {
		opacity: 0;
		-webkit-transform: scale(0);
	}
	50% {
		opacity: 0.4;
		-webkit-transform: scale(2);
	}
	100% {
		opacity: 0.2;
		-webkit-transform: scale(5);
	}
}
@-webkit-keyframes fadeInRotate {
	0% {
		opacity: 0;
		-webkit-transform: scale(0) rotate(360deg);
	}
	100% {
		opacity: 1;
		-webkit-transform: scale(1) rotate(0deg);
	}
}
/**/

@-moz-keyframes blurFadeInOut {
	0% {
		opacity: 0;
		text-shadow: 0px 0px 40px #fff;
		-moz-transform: scale(1.3);
	}
	20%, 75% {
		opacity: 1;
		text-shadow: 0px 0px 1px #fff;
		-moz-transform: scale(1);
	}
	100% {
		opacity: 0;
		text-shadow: 0px 0px 50px #fff;
		-moz-transform: scale(0);
	}
}
@-moz-keyframes blurFadeIn {
	0% {
		opacity: 0;
		text-shadow: 0px 0px 40px #fff;
		-moz-transform: scale(1.3);
	}
	100% {
		opacity: 1;
		text-shadow: 0px 0px 1px #fff;
		-moz-transform: scale(1);
	}
}
@-moz-keyframes fadeInBack {
	0% {
		opacity: 0;
		-moz-transform: scale(0);
	}
	50% {
		opacity: 0.4;
		-moz-transform: scale(2);
	}
	100% {
		opacity: 0.2;
		-moz-transform: scale(5);
	}
}
@-moz-keyframes fadeInRotate {
	0% {
		opacity: 0;
		-moz-transform: scale(0) rotate(360deg);
	}
	100% {
		opacity: 1;
		-moz-transform: scale(1) rotate(0deg);
	}
}
/**/

@keyframes blurFadeInOut {
	0% {
		opacity: 0;
		text-shadow: 0px 0px 40px #fff;
		transform: scale(1.3);
	}
	20%, 75% {
		opacity: 1;
		text-shadow: 0px 0px 1px #fff;
		transform: scale(1);
	}
	100% {
		opacity: 0;
		text-shadow: 0px 0px 50px #fff;
		transform: scale(0);
	}
}
@keyframes blurFadeIn {
	0% {
		opacity: 0;
		text-shadow: 0px 0px 40px #fff;
		transform: scale(1.3);
	}
	50% {
		opacity: 0.5;
		text-shadow: 0px 0px 10px #fff;
		transform: scale(1.1);
	}
	100% {
		opacity: 1;
		text-shadow: 0px 0px 1px #fff;
		transform: scale(1);
	}
}
@keyframes fadeInBack {
	0% {
		opacity: 0;
		transform: scale(0);
	}
	50% {
		opacity: 0.4;
		transform: scale(2);
	}
	100% {
		opacity: 0.2;
		transform: scale(5);
	}
}
@keyframes fadeInRotate {
	0% {
		opacity: 0;
		transform: scale(0) rotate(360deg);
	}
	100% {
		opacity: 1;
		transform: scale(1) rotate(0deg);
	}
}

/* Arrow Down */

/* Current Projects */

.currentProjects1 h6 {
	position: relative;
	font-size: 30px;
	z-index: ;
	overflow: hidden;
	text-align: center;
	font-weight: 100;
	bottom: 0;
	color: white;
	margin-top: 900px;
}
h6:before, h6:after {
	position: absolute;
	top: 80%;
	overflow: hidden;
	width: 50%;
	height: 1px;
	content: '\a0';
	background-color: white;
	font-weight: 100px;
}
h6:before {
	margin-left: -50%;
}


div.transbox {
	margin: 20px;
	background-color: rgba(0, 0, 0, 0.2);
	border: 1px solid black;
	opacity: 0.;
	filter: alpha(opacity=60);
	/* For IE8 and earlier */
}
div.transbox {
	font-weight: bold;
	color: #000000;
	margin: 100px;
}
img {
	display: inline-block;
	height: 300px;
	width: 400;
	text-align: center;
}
.rbcoaching {
	display: inline-block;
	margin-left: auto;
	margin-right: auto;
	height: 360px;
	width: 480px;
	padding: 40px;
}
#images {
	text-align: center;
}
/* Down Arrow */

.scroll-down {
	position: absolute;
	left: 50%;
	bottom: 10px;
	display: block;
	text-align: center;
	font-size: 40px;
	z-index: 100;
	text-decoration: none;
	text-shadow: 0;
	width: 13px;
	height: 13px;
	border-bottom: 2px solid #fff;
	border-right: 2px solid #fff;
	z-index: 9;
	left: 50%;
	-webkit-transform: translate(-50%, 0%) rotate(45deg);
	-moz-transform: translate(-50%, 0%) rotate(45deg);
	transform: translate(-50%, 0%) rotate(45deg);
	-webkit-animation: fade_move_down 4s ease-in-out infinite;
	-moz-animation: fade_move_down 4s ease-in-out infinite;
	animation: fade_move_down 4s ease-in-out infinite;
}
/*animated scroll arrow animation*/

@-webkit-keyframes fade_move_down {
	0% {
		-webkit-transform: translate(0, -10px) rotate(45deg);
		opacity: 0;
	}
	50% {
		opacity: 1;
	}
	100% {
		-webkit-transform: translate(0, 10px) rotate(45deg);
		opacity: 0;
	}
}
@-moz-keyframes fade_move_down {
	0% {
		-moz-transform: translate(0, -10px) rotate(45deg);
		opacity: 0;
	}
	50% {
		opacity: 1;
	}
	100% {
		-moz-transform: translate(0, 10px) rotate(45deg);
		opacity: 0;
	}
}
@keyframes fade_move_down {
	0% {
		transform: translate(0, -10px) rotate(45deg);
		opacity: 0;
	}
	50% {
		opacity: 1;
	}
	100% {
		transform: translate(0, 10px) rotate(45deg);
		opacity: 0;
	}
}
/* Return to Top */

#return-to-top {
	position: fixed;
	bottom: 20px;
	right: 20px;
	background: rgb(0, 0, 0);
	background: rgba(0, 0, 0, 0.6);
	width: 50px;
	height: 50px;
	display: block;
	text-decoration: none;
	-webkit-border-radius: 35px;
	-moz-border-radius: 35px;
	border-radius: 35px;
	display: none;
	-webkit-transition: all 0.3s linear;
	-moz-transition: all 0.3s ease;
	-ms-transition: all 0.3s ease;
	-o-transition: all 0.3s ease;
	transition: all 0.3s ease;
}


h6 {
 overflow: hidden;
 text-align: center;
}
h6:before,
h6:after {
 background-color: #333;
 content: "";
 display: inline-block;
 height: 1px;
 position: relative;
 vertical-align: middle;
 width: 50%;
}
h6:before {
 right: 0.5em;
 margin-left: -50%;
}
h6:after {
 left: 0.5em;
 margin-right: -50%;
}


h3 {
 overflow: hidden;
 text-align: center;
}
h3:before,
h3:after {
 background-color: #333;
 content: "";
 display: inline-block;
 height: 1px;
 position: relative;
 vertical-align: middle;
 width: 50%;
}
h3:before {
 right: 0.5em;
 margin-left: -50%;
}
h3:after {
 left: 0.5em;
 margin-right: -50%;
}








#return-to-top i {
	color: white;
	margin: 0;
	position: relative;
	left: 20px;
	top: 13px;
	font-size: 28px;
	-webkit-transition: all 0.3s ease;
	-moz-transition: all 0.3s ease;
	-ms-transition: all 0.3s ease;
	-o-transition: all 0.3s ease;
	transition: all 0.3s ease;
}
#return-to-top:hover {
	background: rgba(0, 0, 0, 0.9);
}
#return-to-top:hover i {
	color: #fff;
	top: 5px;
}



** fadeInLeft **/

@-webkit-keyframes fadeInLeft {
    from {
        opacity:0;
        -webkit-transform: translatex(-10px);
        -moz-transform: translatex(-10px);
        -o-transform: translatex(-10px);
        transform: translatex(-10px);
    }
    to {
        opacity:1;
        -webkit-transform: translatex(0);
        -moz-transform: translatex(0);
        -o-transform: translatex(0);
        transform: translatex(0);
    }
}
@-moz-keyframes fadeInLeft {
    from {
        opacity:0;
        -webkit-transform: translatex(-10px);
        -moz-transform: translatex(-10px);
        -o-transform: translatex(-10px);
        transform: translatex(-10px);
    }
    to {
        opacity:1;
        -webkit-transform: translatex(0);
        -moz-transform: translatex(0);
        -o-transform: translatex(0);
        transform: translatex(0);
    }
}
@keyframes fadeInLeft {
    from {
        opacity:0;
        -webkit-transform: translatex(-100px);
        -moz-transform: translatex(-100px);
        -o-transform: translatex(-100px);
        transform: translatex(-100px);
    }
    to {
        opacity:1;
        -webkit-transform: translatex(0);
        -moz-transform: translatex(0);
        -o-transform: translatex(0);
        transform: translatex(0);
    }
}
.in-left {
    -webkit-animation-name: fadeInLeft;
    -moz-animation-name: fadeInLeft;
    -o-animation-name: fadeInLeft;
    animation-name: fadeInLeft;
    -webkit-animation-fill-mode: both;
    -moz-animation-fill-mode: both;
    -o-animation-fill-mode: both;
    animation-fill-mode: both;
    -webkit-animation-duration: 1s;
    -moz-animation-duration: 1s;
    -o-animation-duration: 1s;
    animation-duration: 1s;
    -webkit-animation-delay: 1s;
    -moz-animation-delay: 1s;
    -o-animation-duration:1s;
    animation-delay: 1s;

}
.in-left h5 {

  margin-top: 20%;
	margin-left: 28%;
  font-size: 48px;
	display: flex;
}
.in-left p {
  float: left;
  width: 500px;
  margin-left:20%;
  margin-top:30;
	display: flex;
}
.in-right img{
	position: absolute;
  width:380px;
   height:540px;
	 display: flex;
}
.in-right p {

	float: right;
   margin-right: 30%;
   margin-top: 0%;
	 display: flex;
}



/*Footer*/

#footer {
  position: ;
  margin-top: -180px;
  /* negative value of footer height */
  height: 180px;
  clear: both;
  background-color: red;
}
.footer {
  bottom: 100%l
	color: black;
	text-align: center;
}

0 个答案:

没有答案