如何在每个部分的底部中心放置一个箭头?

时间:2017-04-04 10:40:31

标签: html css

我正在寻找我的" FINAL WEBPAGE"代码在主页中有两个部分。当用户点击同一页面上第一部分的箭头时,它会将它们带到第2部分。从第二部分开始,我将有一个箭头,如果用户点击它,它会将它们带回第一部分。我已经建立了箭头链接系统。但是,我看不到页面上的箭头?

如何让箭头<a href="#section two"> <i class="fa fa-angle-down" style="font-size:100px;"></i></a>位于第一部分的底部中心?

如何让箭头<a href="#section two"> <i class="fa fa-angle-up" style="font-size:100px;"></i></a>位于第二部分的底部中心?

最终网页

&#13;
&#13;
<style>

.anchorAwesome {
  position: relative;
  z-index: 99;
  display: block;
  width: 100%;
  display: block;
  height: 40px;
  top:190px;
  left:-23px;
  float: left;
  text-align: center;
}

.anchorAwesome.FixPosition {
  position: absolute;
  bottom: 50px;
}

#contact-me {
  position: relative
}

#nav_a {
  width: 40%;
}

#nav_img {
  width: 100%;
  height: 30px;
  margin-top: 10px;
  vertical-align: middle;
}

@media (min-width: 768px) {
  .navbar-nav.navbar-center {
    position: absolute;
    left: 50%;
    transform: translatex(-50%);
  }
}

.body {
  font-family: 'Roboto', sans-serif;
  color: black;
}

.navbar.navbar-default {
  background-color: #FFFFFF;
  height: 10vh;
  z-index: 100;
}

.navbar.navbar-default ul {
  list-style-type: none;
  text-align: right;
}

.navbar.navbar-default ul li {
  display: inline-block;
}

.dropdown-menu li {
  text-align: center;
}

.dropdown .dropdown-menu {
  background-color: #FFFFFF;
}

.dropdown .dropdown-menu a {
  color: white;
}

.navbar.navbar-default ul li a {
  display: inline-block;
  padding: 3.5vh 8px 4px;
  color: black;
  text-decoration: none;
  font-size: 14pt;
}

.navbar.navbar-default ul li:after {
  content: '';
  position: absolute;
  right: 50%;
  bottom: 0;
  left: 50%;
  height: 3px;
  background-color: black;
  border-radius: 9px;
  transition: all .2s;
}

.nav.navbar-nav,
.nav.navbar-nav>li {
  float: none;
}

.navbar.navbar-default ul li:hover:after {
  right: 0;
  left: 0;
}

.navbar.navbar-default ul.dropdown-menu li,
.navbar.navbar-default ul.dropdown-menu li a {
  position: relative;
  display: block;
}

.section {
  min-height: 100vh;
}

.one {
  background-color: #FFFFFF;
}

.two {
  background-color: #FFFFFF;
}

#sections .section {
  padding-top: 50px;
}

.hero {
  background: url("https://static.pexels.com/photos/38892/pexels-photo-38892.jpeg") center center no-repeat;
  background-attachment: fixed;
  background-size: cover;
  width: 100%;
  max-width: 100%;
  width: 100vw;
  height: 60%;
}

.shape {
  border-radius: 25px;
  background: #4D5061;
  content: url(http://i1126.photobucket.com/albums/l611/ldocherty1/IMG_0730_zpsiz4dqc47.jpg);
  color: white;
  height: 300px;
  margin: auto;
  padding: 3px;
  width: 300px;
  top: 15%;
  left: 50%;
  position: absolute;
  margin-left: -150px;
  z-index: 10;
}

.fa-angle-down {
  color: #4D5061;
  position: absolute;
  margin-bottom: auto;
}

.fa-angle-up {
  color: #4D5061;
  position: absolute;
  margin-bottom: auto;
}

.s1-text {
  text-align: center;
  font-size: 20pt;
  color: black;
  font-family: 'Roboto', sans-serif;
  z-index: 99;
  position: absolute;
  bottom: 60px;
  top: 420px;
  left: -10px;
  right: 0px;
}

.s2-text {
  text-align: center;
  color: black;
  font-size: 20pt;
  font-family: 'Roboto', sans-serif;
  z-index: 99;
  position: absolute;
  bottom: 10px;
  top: 450px;
  left: -10px;
  right: 0px;
}

.center-block {
  display: block;
  margin-right: auto;
  margin-top: 30px;
  margin-left: 20px;
}

@import url(http://fonts.googleapis.com/css?family=Montserrat:400,700);
#feedback-page {
  text-align: center;
}

#form-main {
  width: 100%;
  float: left;
  padding-top: 0px;
}

#form-div {
  background-color: rgba(72, 72, 72, 0.4);
  padding-left: 35px;
  padding-right: 35px;
  padding-top: 35px;
  padding-bottom: 50px;
  width: 450px;
  float: left;
  left: 50%;
  position: absolute;
  margin-top: 30px;
  margin-left: -260px;
  -moz-border-radius: 7px;
  -webkit-border-radius: 7px;
}

.feedback-input {
  color: #3c3c3c;
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 500;
  font-size: 18px;
  border-radius: 0;
  line-height: 22px;
  background-color: #fbfbfb;
  padding: 13px 13px 13px 54px;
  margin-bottom: 10px;
  width: 100%;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  -ms-box-sizing: border-box;
  box-sizing: border-box;
  border: 3px solid rgba(0, 0, 0, 0);
}

.feedback-input:focus {
  background: #fff;
  box-shadow: 0;
  border: 3px solid #3498db;
  color: #3498db;
  outline: none;
  padding: 13px 13px 13px 54px;
}

.focused {
  color: #30aed6;
  border: #30aed6 solid 3px;
}

#name {
  background-image: url(http://rexkirby.com/kirbyandson/images/name.svg);
  background-size: 30px 30px;
  background-position: 11px 8px;
  background-repeat: no-repeat;
}

#name:focus {
  background-image: url(http://rexkirby.com/kirbyandson/images/name.svg);
  background-size: 30px 30px;
  background-position: 8px 5px;
  background-position: 11px 8px;
  background-repeat: no-repeat;
}

#email {
  background-image: url(http://rexkirby.com/kirbyandson/images/email.svg);
  background-size: 30px 30px;
  background-position: 11px 8px;
  background-repeat: no-repeat;
}

#email:focus {
  background-image: url(http://rexkirby.com/kirbyandson/images/email.svg);
  background-size: 30px 30px;
  background-position: 11px 8px;
  background-repeat: no-repeat;
}

#comment {
  background-image: url(http://rexkirby.com/kirbyandson/images/comment.svg);
  background-size: 30px 30px;
  background-position: 11px 8px;
  background-repeat: no-repeat;
}

.textarea {
  width: 100%;
  height: 150px;
  line-height: 150%;
  resize: vertical;
}

.input:hover,
textarea:hover,
.input:focus,
textarea:focus {
  background-color: white;
}

#button-blue {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  float: left;
  width: 100%;
  border: #fbfbfb solid 4px;
  cursor: pointer;
  background-color: #3498db;
  color: white;
  font-size: 24px;
  padding-top: 22px;
  padding-bottom: 22px;
  -webkit-transition: all 0.3s;
  -moz-transition: all 0.3s;
  transition: all 0.3s;
  margin-top: -4px;
  font-weight: 700;
}

#button-blue:hover {
  background-color: rgba(0, 0, 0, 0);
  color: #0493bd;
}

.submit:hover {
  color: #3498db;
}

.ease {
  width: 0px;
  height: 74px;
  background-color: #fbfbfb;
  -webkit-transition: .3s ease;
  -moz-transition: .3s ease;
  -o-transition: .3s ease;
  -ms-transition: .3s ease;
  transition: .3s ease;
}

.submit:hover .ease {
  width: 100%;
  background-color: white;
}

@media only screen and (max-width: 580px) {
  #form-div {
    left: 3%;
    margin-right: 3%;
    width: 88%;
    margin-left: 0;
    padding-left: 3%;
    padding-right: 3%;
  }
}
</style>
&#13;
<!DOCTYPE html>
<html lang="en">

<head>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  <script src="https://code.jquery.com/jquery-3.1.1.js" integrity="sha256-16cdPddA6VdVInumRGo6IbivbERE8p7CQR3HzTBuELA=" crossorigin="anonymous"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/fullPage.js/2.9.4/jquery.fullpage.min.js"></script>
</head>



<body>
  <nav class="navbar navbar-default navbar-fixed-top">
    <div class="container-fluid">
      <div class="navbar-header">
        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
               <span class="sr-only">Toggle navigation</span>
               <span class="icon-bar"></span>
               <span class="icon-bar"></span>
               <span class="icon-bar"></span>
               </button>
        <a id="nav_a" class="navbar-brand pull-left" href=""><img id="nav_img" class="img-responsive" src="http://i1126.photobucket.com/albums/l611/ldocherty1/logo1_zpsep8qps5m.png" alt="Logo design"></a>
        <h5 class="nav-title text-center center-block hidden-sm hidden-md hidden-lg" id="nav-center">Liam Docherty's Digital Portfolio</h5>
      </div>
      <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
        <ul class="nav navbar-nav navbar-center">
          <h5 class="nav-title text-center center-block hidden-xs ">Liam Docherty's Digital Portfolio</h5>
        </ul>
        <ul class="nav navbar-nav navbar-right">
          <li><a href="#">Home</a>
          </li>
          <li class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="true">Units <span class="caret"></span></a>
            <ul class="dropdown-menu">
              <li><a href="#">Unit 6</a>
              </li>
              <li><a href="#section3">Unit 14</a>
              </li>
              <li><a href="#">Unit 7</a>
              </li>
              <li><a href="#">Unit 1</a>
              </li>
            </ul>
          </li>
          <li class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">About <span class="caret"></span></a>
            <ul class="dropdown-menu">
              <li><a href="#">About Me</a>
              </li>
              <li><a href="#">CV</a>
              </li>
              <li><a href="#">Education</a>
              </li>
            </ul>
          </li>
          <li><a href="#contact-me">Contact Me</a>
          </li>
        </ul>
      </div>
    </div>
  </nav>
  <div id="sections">
    <div class="section one" id="section_one">
      <div class="shape"></div>
      <div class="hero"></div>
      <h1 class="s1-text center-block">WELCOME TO MY</h1>
      <h1 class="s2-text center-block">PORTFOLIO</h1>
      <a href="#contact-me" class="anchorAwesome"> <i class="fa fa-angle-down" style="font-size:100px;"></i></a>
    </div>
    <section id="contact-me" class="section two">
      <h2 class="s3-text">Click on the arrow to scroll down</h2>
      <h1 class="contact-title">Copyright © 2017 Liam Docherty's Site. All rights reserved.</h1>
      <div id="form-main">
        <div id="form-div">
          <form class="form" id="form1">
            <p class="name">
              <input name="name" type="text" class="validate[required,custom[onlyLetter],length[0,100]] feedback-input" placeholder="Name" id="name" />
            </p>
            <p class="email">
              <input name="email" type="text" class="validate[required,custom[email]] feedback-input" id="email" placeholder="Email" />
            </p>
            <textarea name="text" class="validate[required,length[6,300]] feedback-input" id="comment" placeholder="Comment"></textarea>
            </p>
            <div class="submit">
              <input type="submit" value="SEND" id="button-blue" />
              <div class="ease"></div>
            </div>
          </form>
        </div>
        <a href="#section_one" class="anchorAwesome"> <i class="fa fa-angle-up" style="font-size:100px;"></i></a>
      </div>
      <script>
        $(document).ready(function() {
          $('#sections').fullpage();
        });
      </script>
</body>

</html>
&#13;
&#13;
&#13;

2 个答案:

答案 0 :(得分:2)

我创造了一个小提琴。

  

以下是我修复的一些错误。

<强> 1。链接FontAwesome正确。

<强> 2。修正了顶部和底部箭头上的href链接。

.anchorAwesome {
  position: relative;
  z-index: 99;
  display: block;
  width: 100%;
  display: block;
  height: 40px;
  float: left;
  text-align: center;
}

.anchorAwesome.FixPosition {
  position: absolute;
  bottom: 50px;
}

#contact-me {
  position: relative
}

#nav_a {
  width: 40%;
}

#nav_img {
  width: 100%;
  height: 30px;
  margin-top: 10px;
  vertical-align: middle;
}

@media (min-width: 768px) {
  .navbar-nav.navbar-center {
    position: absolute;
    left: 50%;
    transform: translatex(-50%);
  }
}

.body {
  font-family: 'Roboto', sans-serif;
  color: black;
}

.navbar.navbar-default {
  background-color: #FFFFFF;
  height: 10vh;
  z-index: 100;
}

.navbar.navbar-default ul {
  list-style-type: none;
  text-align: right;
}

.navbar.navbar-default ul li {
  display: inline-block;
}

.dropdown-menu li {
  text-align: center;
}

.dropdown .dropdown-menu {
  background-color: #FFFFFF;
}

.dropdown .dropdown-menu a {
  color: white;
}

.navbar.navbar-default ul li a {
  display: inline-block;
  padding: 3.5vh 8px 4px;
  color: black;
  text-decoration: none;
  font-size: 14pt;
}

.navbar.navbar-default ul li:after {
  content: '';
  position: absolute;
  right: 50%;
  bottom: 0;
  left: 50%;
  height: 3px;
  background-color: black;
  border-radius: 9px;
  transition: all .2s;
}

.nav.navbar-nav,
.nav.navbar-nav>li {
  float: none;
}

.navbar.navbar-default ul li:hover:after {
  right: 0;
  left: 0;
}

.navbar.navbar-default ul.dropdown-menu li,
.navbar.navbar-default ul.dropdown-menu li a {
  position: relative;
  display: block;
}

.section {
  min-height: 100vh;
}

.one {
  background-color: #FFFFFF;
}

.two {
  background-color: #FFFFFF;
}

#sections .section {
  padding-top: 50px;
}

.hero {
  background: url("https://static.pexels.com/photos/38892/pexels-photo-38892.jpeg") center center no-repeat;
  background-attachment: fixed;
  background-size: cover;
  width: 100%;
  max-width: 100%;
  width: 100vw;
  height: 60%;
}

.shape {
  border-radius: 25px;
  background: #4D5061;
  content: url(http://i1126.photobucket.com/albums/l611/ldocherty1/IMG_0730_zpsiz4dqc47.jpg);
  color: white;
  height: 300px;
  margin: auto;
  padding: 3px;
  width: 300px;
  top: 15%;
  left: 50%;
  position: absolute;
  margin-left: -150px;
  z-index: 10;
}

.fa-angle-down {
  color: #4D5061;
  position: absolute;
  margin-bottom: auto;
}

.fa-angle-up {
  color: #4D5061;
  position: absolute;
  margin-bottom: auto;
}

.s1-text {
  text-align: center;
  font-size: 20pt;
  color: black;
  font-family: 'Roboto', sans-serif;
  z-index: 99;
  position: absolute;
  bottom: 60px;
  top: 420px;
  left: -10px;
  right: 0px;
}

.s2-text {
  text-align: center;
  color: black;
  font-size: 20pt;
  font-family: 'Roboto', sans-serif;
  z-index: 99;
  position: absolute;
  bottom: 10px;
  top: 450px;
  left: -10px;
  right: 0px;
}

.center-block {
  display: block;
  margin-right: auto;
  margin-top: 30px;
  margin-left: 20px;
}

@import url(http://fonts.googleapis.com/css?family=Montserrat:400,700);
#feedback-page {
  text-align: center;
}

#form-main {
  width: 100%;
  float: left;
  padding-top: 0px;
}

#form-div {
  background-color: rgba(72, 72, 72, 0.4);
  padding-left: 35px;
  padding-right: 35px;
  padding-top: 35px;
  padding-bottom: 50px;
  width: 450px;
  float: left;
  left: 50%;
  position: absolute;
  margin-top: 30px;
  margin-left: -260px;
  -moz-border-radius: 7px;
  -webkit-border-radius: 7px;
}

.feedback-input {
  color: #3c3c3c;
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 500;
  font-size: 18px;
  border-radius: 0;
  line-height: 22px;
  background-color: #fbfbfb;
  padding: 13px 13px 13px 54px;
  margin-bottom: 10px;
  width: 100%;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  -ms-box-sizing: border-box;
  box-sizing: border-box;
  border: 3px solid rgba(0, 0, 0, 0);
}

.feedback-input:focus {
  background: #fff;
  box-shadow: 0;
  border: 3px solid #3498db;
  color: #3498db;
  outline: none;
  padding: 13px 13px 13px 54px;
}

.focused {
  color: #30aed6;
  border: #30aed6 solid 3px;
}

#name {
  background-image: url(http://rexkirby.com/kirbyandson/images/name.svg);
  background-size: 30px 30px;
  background-position: 11px 8px;
  background-repeat: no-repeat;
}

#name:focus {
  background-image: url(http://rexkirby.com/kirbyandson/images/name.svg);
  background-size: 30px 30px;
  background-position: 8px 5px;
  background-position: 11px 8px;
  background-repeat: no-repeat;
}

#email {
  background-image: url(http://rexkirby.com/kirbyandson/images/email.svg);
  background-size: 30px 30px;
  background-position: 11px 8px;
  background-repeat: no-repeat;
}

#email:focus {
  background-image: url(http://rexkirby.com/kirbyandson/images/email.svg);
  background-size: 30px 30px;
  background-position: 11px 8px;
  background-repeat: no-repeat;
}

#comment {
  background-image: url(http://rexkirby.com/kirbyandson/images/comment.svg);
  background-size: 30px 30px;
  background-position: 11px 8px;
  background-repeat: no-repeat;
}

.textarea {
  width: 100%;
  height: 150px;
  line-height: 150%;
  resize: vertical;
}

.input:hover,
textarea:hover,
.input:focus,
textarea:focus {
  background-color: white;
}

#button-blue {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  float: left;
  width: 100%;
  border: #fbfbfb solid 4px;
  cursor: pointer;
  background-color: #3498db;
  color: white;
  font-size: 24px;
  padding-top: 22px;
  padding-bottom: 22px;
  -webkit-transition: all 0.3s;
  -moz-transition: all 0.3s;
  transition: all 0.3s;
  margin-top: -4px;
  font-weight: 700;
}

#button-blue:hover {
  background-color: rgba(0, 0, 0, 0);
  color: #0493bd;
}

.submit:hover {
  color: #3498db;
}

.ease {
  width: 0px;
  height: 74px;
  background-color: #fbfbfb;
  -webkit-transition: .3s ease;
  -moz-transition: .3s ease;
  -o-transition: .3s ease;
  -ms-transition: .3s ease;
  transition: .3s ease;
}

.submit:hover .ease {
  width: 100%;
  background-color: white;
}

@media only screen and (max-width: 580px) {
  #form-div {
    left: 3%;
    margin-right: 3%;
    width: 88%;
    margin-left: 0;
    padding-left: 3%;
    padding-right: 3%;
  }
}
<!DOCTYPE html>
<html lang="en">

<head>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  <script src="https://code.jquery.com/jquery-3.1.1.js" integrity="sha256-16cdPddA6VdVInumRGo6IbivbERE8p7CQR3HzTBuELA=" crossorigin="anonymous"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/fullPage.js/2.9.4/jquery.fullpage.min.js"></script>
</head>

<body>
  <nav class="navbar navbar-default navbar-fixed-top">
    <div class="container-fluid">
      <div class="navbar-header">
        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
               <span class="sr-only">Toggle navigation</span>
               <span class="icon-bar"></span>
               <span class="icon-bar"></span>
               <span class="icon-bar"></span>
               </button>
        <a id="nav_a" class="navbar-brand pull-left" href=""><img id="nav_img" class="img-responsive" src="http://i1126.photobucket.com/albums/l611/ldocherty1/logo1_zpsep8qps5m.png" alt="Logo design"></a>
        <h5 class="nav-title text-center center-block hidden-sm hidden-md hidden-lg" id="nav-center">Liam Docherty's Digital Portfolio</h5>
      </div>
      <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
        <ul class="nav navbar-nav navbar-center">
          <h5 class="nav-title text-center center-block hidden-xs ">Liam Docherty's Digital Portfolio</h5>
        </ul>
        <ul class="nav navbar-nav navbar-right">
          <li><a href="#">Home</a>
          </li>
          <li class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="true">Units <span class="caret"></span></a>
            <ul class="dropdown-menu">
              <li><a href="#">Unit 6</a>
              </li>
              <li><a href="#section3">Unit 14</a>
              </li>
              <li><a href="#">Unit 7</a>
              </li>
              <li><a href="#">Unit 1</a>
              </li>
            </ul>
          </li>
          <li class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">About <span class="caret"></span></a>
            <ul class="dropdown-menu">
              <li><a href="#">About Me</a>
              </li>
              <li><a href="#">CV</a>
              </li>
              <li><a href="#">Education</a>
              </li>
            </ul>
          </li>
          <li><a href="#contact-me">Contact Me</a>
          </li>
        </ul>
      </div>
    </div>
  </nav>
  <div id="sections">
    <div class="section one" id="section_one">
      <div class="shape"></div>
      <div class="hero"></div>
      <h1 class="s1-text center-block">WELCOME TO MY</h1>
      <h1 class="s2-text center-block">PORTFOLIO</h1>
      <a href="#contact-me" class="anchorAwesome"> <i class="fa fa-angle-down" style="font-size:100px;"></i></a>
    </div>
    <section id="contact-me" class="section two">
      <h2 class="s3-text">Click on the arrow to scroll down</h2>
      <h1 class="contact-title">Copyright © 2017 Liam Docherty's Site. All rights reserved.</h1>
      <div id="form-main">
        <div id="form-div">
          <form class="form" id="form1">
            <p class="name">
              <input name="name" type="text" class="validate[required,custom[onlyLetter],length[0,100]] feedback-input" placeholder="Name" id="name" />
            </p>
            <p class="email">
              <input name="email" type="text" class="validate[required,custom[email]] feedback-input" id="email" placeholder="Email" />
            </p>
            <textarea name="text" class="validate[required,length[6,300]] feedback-input" id="comment" placeholder="Comment"></textarea>
            </p>
            <div class="submit">
              <input type="submit" value="SEND" id="button-blue" />
              <div class="ease"></div>
            </div>
          </form>
        </div>
        <a href="#section_one" class="anchorAwesome FixPosition"> <i class="fa fa-angle-up" style="font-size:100px;"></i></a>
      </div>
      <script>
        $(document).ready(function() {
          $('#sections').fullpage();
        });
      </script>
</body>

</html>

答案 1 :(得分:0)

正确检查您的主播href的顶部和底部链接。

 #nav_a {
      width:40%;
      }
      #nav_img {
      width:100%;
      height: 30px;
      margin-top: 10px;
      vertical-align: middle;
      }
      @media (min-width: 768px) {
      .navbar-nav.navbar-center {
      position: absolute;
      left: 50%;
      transform: translatex(-50%);
      }
      }
      .body {
      font-family: 'Roboto', sans-serif;
      color: black;
      }
      .navbar.navbar-default {
      background-color: #FFFFFF;
      height: 10vh;
      z-index: 100;
      }
      .navbar.navbar-default ul {
      list-style-type: none;
      text-align: right;
      }
      .navbar.navbar-default ul li {
      display: inline-block;
      }
      .dropdown-menu li {
      text-align: center;
      }
      .dropdown .dropdown-menu {
      background-color: #FFFFFF;
      }
      .dropdown .dropdown-menu a {
      color: white;
      }
      .navbar.navbar-default ul li a {
      display: inline-block;
      padding: 3.5vh 8px 4px;
      color: black;
      text-decoration: none;
      font-size: 14pt;
      }
      .navbar.navbar-default ul li:after {
      content: '';
      position: absolute;
      right: 50%;
      bottom: 0;
      left: 50%;
      height: 3px;
      background-color: black;
      border-radius: 9px;
      transition: all .2s;
      }
      .nav.navbar-nav,
      .nav.navbar-nav>li {
      float: none;
      }
      .navbar.navbar-default ul li:hover:after {
      right: 0;
      left: 0;
      }
      .navbar.navbar-default ul.dropdown-menu li,
      .navbar.navbar-default ul.dropdown-menu li a {
      position: relative;
      display: block;
      }
      .section {
      min-height: 100vh;
      }
      .one {
      background-color: #FFFFFF;
      }
      .two {
      background-color: #FFFFFF;
      }
      #sections .section {
      padding-top: 50px;
      }
      .hero {
      background: url("https://static.pexels.com/photos/38892/pexels-photo-38892.jpeg") center center no-repeat;
      background-attachment: fixed;
      background-size: cover;
      width: 100%;
      max-width: 100%;
      width: 100vw;
      height: 60%;
      }
      .shape {
      border-radius: 25px;
      background: #4D5061;
      content: url(http://i1126.photobucket.com/albums/l611/ldocherty1/IMG_0730_zpsiz4dqc47.jpg);
      color: white;
      height: 300px;
      margin: auto;
      padding: 3px;
      width: 300px;
      top: 15%;
      left: 50%;
      position: absolute;
      margin-left: -150px;
      z-index: 10;
      }
      .fa-angle-down {
      color: #4D5061;
      position: absolute;
      margin-bottom: auto;
    }

    .fa-angle-up {
      color: #4D5061;
      position: absolute;
      margin-bottom: auto;
    }
      .s1-text {
      text-align: center;
      font-size: 20pt;
      color: black;
      font-family: 'Roboto', sans-serif;
      z-index: 99;
      position: absolute;
      bottom: 60px;
      top:420px;
      left: -10px;
      right: 0px;
      }
      .s2-text {
      text-align: center;
      color: black;
      font-size: 20pt;
      font-family: 'Roboto', sans-serif;
      z-index: 99;
      position: absolute;
      bottom: 10px;
      top:450px;
      left: -10px;
      right: 0px;
      }
      .center-block {
      display: block;
      margin-right: auto;
      margin-top: 30px;
      margin-left: 20px;
      }
      @import url(http://fonts.googleapis.com/css?family=Montserrat:400,700);
      #feedback-page{
      text-align:center;
      }
      #form-main{
      width:100%;
      float:left;
      padding-top:0px;
      }
      #form-div {
      background-color:rgba(72,72,72,0.4);
      padding-left:35px;
      padding-right:35px;
      padding-top:35px;
      padding-bottom:50px;
      width: 450px;
      float: left;
      left: 50%;
      position: absolute;
      margin-top:30px;
      margin-left: -260px;
      -moz-border-radius: 7px;
      -webkit-border-radius: 7px;
      }
      .feedback-input {
      color:#3c3c3c;
      font-family: Helvetica, Arial, sans-serif;
      font-weight:500;
      font-size: 18px;
      border-radius: 0;
      line-height: 22px;
      background-color: #fbfbfb;
      padding: 13px 13px 13px 54px;
      margin-bottom: 10px;
      width:100%;
      -webkit-box-sizing: border-box;
      -moz-box-sizing: border-box;
      -ms-box-sizing: border-box;
      box-sizing: border-box;
      border: 3px solid rgba(0,0,0,0);
      }
      .feedback-input:focus {
      background: #fff;
      box-shadow: 0;
      border: 3px solid #3498db;
      color: #3498db;
      outline: none;
      padding: 13px 13px 13px 54px;
      }
      .focused{
      color:#30aed6;
      border:#30aed6 solid 3px;
      }
      #name {
      background-image: url(http://rexkirby.com/kirbyandson/images/name.svg);
      background-size: 30px 30px;
      background-position: 11px 8px;
      background-repeat: no-repeat;
      }
      #name:focus {
      background-image: url(http://rexkirby.com/kirbyandson/images/name.svg);
      background-size: 30px 30px;
      background-position: 8px 5px;
      background-position: 11px 8px;
      background-repeat: no-repeat;
      }
      #email {
      background-image: url(http://rexkirby.com/kirbyandson/images/email.svg);
      background-size: 30px 30px;
      background-position: 11px 8px;
      background-repeat: no-repeat;
      }
      #email:focus {
      background-image: url(http://rexkirby.com/kirbyandson/images/email.svg);
      background-size: 30px 30px;
      background-position: 11px 8px;
      background-repeat: no-repeat;
      }
      #comment {
      background-image: url(http://rexkirby.com/kirbyandson/images/comment.svg);
      background-size: 30px 30px;
      background-position: 11px 8px;
      background-repeat: no-repeat;
      }
      .textarea {
      width: 100%;
      height: 150px;
      line-height: 150%;
      resize:vertical;
      }
      .input:hover, textarea:hover,
      .input:focus, textarea:focus {
      background-color:white;
      }
      #button-blue {
      font-family: 'Montserrat', Arial, Helvetica, sans-serif;
      float:left;
      width: 100%;
      border: #fbfbfb solid 4px;
      cursor:pointer;
      background-color: #3498db;
      color:white;
      font-size:24px;
      padding-top:22px;
      padding-bottom:22px;
      -webkit-transition: all 0.3s;
      -moz-transition: all 0.3s;
      transition: all 0.3s;
      margin-top:-4px;
      font-weight:700;
      }
      #button-blue:hover {
      background-color: rgba(0,0,0,0);
      color: #0493bd;
      }
      .submit:hover {
      color: #3498db;
      }
      .ease {
      width: 0px;
      height: 74px;
      background-color: #fbfbfb;
      -webkit-transition: .3s ease;
      -moz-transition: .3s ease;
      -o-transition: .3s ease;
      -ms-transition: .3s ease;
      transition: .3s ease;
      }
      .submit:hover .ease {
      width:100%;
      background-color:white;
      }
      @media only screen and (max-width: 580px) {
      #form-div {
      left: 3%;
      margin-right: 3%;
      width: 88%;
      margin-left: 0;
      padding-left: 3%;
      padding-right: 3%;
      }
<!DOCTYPE html>
<html lang="en">
   <head>
      <meta name="viewport" content="width=device-width, initial-scale=1">
      <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
      <script src="https://code.jquery.com/jquery-3.1.1.js" integrity="sha256-16cdPddA6VdVInumRGo6IbivbERE8p7CQR3HzTBuELA=" crossorigin="anonymous"></script>
      <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
      <script src="https://cdnjs.cloudflare.com/ajax/libs/fullPage.js/2.9.4/jquery.fullpage.min.js"></script>
      
   </head>
   
   <body>
      <nav class="navbar navbar-default navbar-fixed-top">
         <div class="container-fluid">
            <div class="navbar-header">
               <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
               <span class="sr-only">Toggle navigation</span>
               <span class="icon-bar"></span>
               <span class="icon-bar"></span>
               <span class="icon-bar"></span>
               </button>
               <a id="nav_a" class="navbar-brand pull-left" href=""><img id="nav_img" class="img-responsive" src="http://i1126.photobucket.com/albums/l611/ldocherty1/logo1_zpsep8qps5m.png" alt="Logo design"></a>
               <h5 class="nav-title text-center center-block hidden-sm hidden-md hidden-lg" id="nav-center">Liam Docherty's Digital Portfolio</h5>
            </div>
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
               <ul class="nav navbar-nav navbar-center">
                  <h5 class="nav-title text-center center-block hidden-xs ">Liam Docherty's Digital Portfolio</h5>
               </ul>
               <ul class="nav navbar-nav navbar-right">
                  <li><a href="#">Home</a>
                  </li>
                  <li class="dropdown">
                     <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="true">Units <span class="caret"></span></a>
                     <ul class="dropdown-menu">
                        <li><a href="#">Unit 6</a>
                        </li>
                        <li><a href="#section3">Unit 14</a>
                        </li>
                        <li><a href="#">Unit 7</a>
                        </li>
                        <li><a href="#">Unit 1</a>
                        </li>
                     </ul>
                  </li>
                  <li class="dropdown">
                     <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">About <span class="caret"></span></a>
                     <ul class="dropdown-menu">
                        <li><a href="#">About Me</a>
                        </li>
                        <li><a href="#">CV</a>
                        </li>
                        <li><a href="#">Education</a>
                        </li>
                     </ul>
                  </li>
                  <li><a href="#contact-me">Contact Me</a>
                  </li>
               </ul>
            </div>
         </div>
      </nav>
      <div id="sections">
      <div class="section one" id="section_one">
         <div class="shape"></div>
         <div class="hero"></div>
         <h1 class="s1-text center-block">WELCOME TO MY</h1>
         <h1 class="s2-text center-block">PORTFOLIO</h1>
         <a href="#contact-me"> To section Two<i class="fa fa-angle-down" style="font-size:100px;"></i></a>
      </div>
      <section id="contact-me" class="section two">
      <h2 class="s3-text">Click on the arrow to scroll down</h2>
      <h1 class="contact-title">Copyright © 2017 Liam Docherty's Site. All rights reserved.</h1>
      <div id="form-main">
         <div id="form-div">
            <form class="form" id="form1">
               <p class="name">
                  <input name="name" type="text" class="validate[required,custom[onlyLetter],length[0,100]] feedback-input" placeholder="Name" id="name" />
               </p>
               <p class="email">
                  <input name="email" type="text" class="validate[required,custom[email]] feedback-input" id="email" placeholder="Email" />
               </p>
                  <textarea name="text" class="validate[required,length[6,300]] feedback-input" id="comment" placeholder="Comment"></textarea>
               </p>
               <div class="submit">
                  <input type="submit" value="SEND" id="button-blue"/>
                  <div class="ease"></div>
               </div>
            </form>
         </div>
         <a href="#section_one">To section one <i class="fa fa-angle-up" style="font-size:100px;"></i></a>
      </div>
      <script>
         $(document).ready(function() {
           $('#sections').fullpage();
         });
      </script>
   </body>
</html>