【发布时间】:2018-08-09 04:30:42
【问题描述】:
我正在尝试制作一个简单的投资组合网站,并且每当我向下或向上导航页面时,我都希望屏幕底部有两个标签。例如,如果我在页面顶部,它会用三个链接显示我的名字,“关于我”、“我的工作”和“联系方式”。如果我点击“关于我”,它会将我向下导航到我拥有该部分的位置。然后这就是我需要帮助的地方,我想要底部的“我的工作”和“联系方式”以便于导航。几个小时以来,我一直在试图解决这个问题,这就是为什么我现在在这里提出一个问题。我是网络编程新手,请原谅。这是我的一些相关代码。
#container {
padding-top: 100vh;
width: 100%;
height: 100vh;
color: white;
}
#container div {
position: relative;
width: 100%;
height: 100%;
}
/* Styling for each indivual link (About Me, My Work, Contact) */
#container div#AboutMe {
background: white;
color: black;
font-family: Helvetica;
font-weight: lighter;
text-align: center;
font-size: 21px;
}
#AboutMe p {
padding-right: 60%;
padding-left: 10%;
padding-top: 5%;
}
.animatedButtonBody span {
cursor: pointer;
display: inline-block;
position: relative;
-webkit-transition: 0.5s;
-o-transition: 0.5s;
transition: 0.5s;
}
.animatedButtonBody span:after {
content: '\00bb';
position: absolute;
opacity: 0;
top: 0;
right: -20px;
-webkit-transition: 0.5s;
-o-transition: 0.5s;
transition: 0.5s;
}
.animatedButtonBody:hover span {
padding-right: 25px;
}
.animatedButtonBody:hover span:after {
opacity: 1;
right: 0;
}
<div id="container">
<div id="AboutMe">
<h1>About Me</h1>
<p>
This is where some text will go.
</p>
<a href="#MyWork" class="animatedButtonBody"><span>My Work</span></a>
<a href="#Contact" class="animatedButtonBody"><span>Contact</span></a>
</div>
</div>
【问题讨论】:
-
请您澄清一下“在底部”是什么意思?
-
因此,如果我单击“关于我”超链接,它将导航到“关于我”信息所在的部分。然后我想要该部分底部的两个超链接,分别是“我的工作”和“联系方式”。所以在那个特定部分的底部。
-
对未来的建议 - 请编辑您的代码并包含重现问题所需的最低要求。在这个问题中,你真的不需要像
cursor:pointer这样的东西。这样更容易理解问题。