我似乎无法弄清楚我做错了什么,我的悬停在我的网站上不起作用



在我的网站上:总部

似乎有一个问题,如果您尝试将鼠标悬停在顶部,在显示文件的位置下,您将无法将鼠标悬停在图像上以转到链接。但是,如果您在视频的底部尝试,您也可以。我做错了什么?我目前正在寻找答案。因此,如果有人能提供帮助,我将不胜感激。我真的知道。我是个菜鸟。我知道。哈哈。

顺便说一句,有一个提示

(对我来说这是一个提示(,如果你将鼠标悬停在顶部的单词上,你可以点击。所以我想这就是我的线索。

请告诉我我能做些什么来让我的问题对任何人都有帮助,我是新手。

我试图查看我的 HTML 中是否拼写错误或遗漏了某些内容,我正在继续我的 CSS

/* Projects section */
.projects-section {
text-align: center;
padding: 10rem 2rem;
background: black;
}
.projects-section-header {
max-width: 640px;
margin: 0 auto 6rem auto;
border-bottom: 0.2rem solid black;
}
@media (max-width: 28.75em) {
.projects-section-header {
font-size: 4rem;
}
}
/* "Automagic" image grid using no media queries */
.projects-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
grid-gap: 4rem;
width: 100%;
max-width: 1280px;
margin: 0 auto;
margin-bottom: 6rem;
}
@media (max-width: 30.625em) {
.projects-section {
padding: 6rem 1rem;
}
.projects-grid {
grid-template-columns: 1fr;
}
}
.project {
background: black;
box-shadow: 1px 1px 2px rgb(255, 0, 0);
border-radius: 13px;
}
.code {
color: var(--main-white);
transition: color 0.3s ease-out;
}
.project.code:hover {
color: #00ff22;
}
.project-image {
height: calc(100% - 6.8rem);
width: 100%;
object-fit: cover;
}
.project-title {
font-size: 2rem;
padding: 2rem 0.5rem;
}
.btn {
display: inline-block;
padding: 1rem 2rem;
border-radius: 2px;
}
.btn-show-all {
font-size: 2rem;
background: black;
transition: background 0.3s ease-out;
}
.btn-show-all:hover {
background: red;;
}
.btn-show-all:hover > i {
transform: translateX(2px);
}
.btn-show-all > i {
margin-left: 10px;
transform: translateX(0);
transition: transform 0.3s ease-out;
}

您的视频容器与您的链接重叠。 将其添加到您的 CSS 中

.video-container {
height: 50%;
}
<style>
.example {
width: 100%;
height: 300px;
background: #DDD;
}
.example:hover {
width: 88%;
height: 300px;
background: grey;
transform: translated(10px);
}
</style>
<div class="example">
<p> Just put your mouser here and watch it change! </p>
</div>

这很简单,你只需要:hover位!

.video-container高度与#welcome-section部分重叠。这个问题可以通过多种方式解决。

例如,您可以调整.video-container高度,或者如果您不想单击它,只需将pointer-events: none;添加到.video-container类中。

最新更新