html - 我似乎无法弄清楚我做错了什么,我的悬停在我的网站上不起作用
问题描述
在我的网站上:总部
似乎存在一个问题,如果您尝试将鼠标悬停在顶部的文件下方,您将无法将鼠标悬停在图像上以转到链接。但是,如果您尝试视频的底部部分,您也可以。我做错了什么?我目前正在寻找答案。因此,如果有人可以提供帮助,我将不胜感激。我真的。我是菜鸟。我知道。哈哈。
顺便说一句,如果您将鼠标悬停在顶部的 WORDS 上,则有一个提示(对我来说这是一个提示),您可以单击。所以我想这就是我的线索。
请告诉我我能做些什么来让我的问题对任何人都有帮助,我是新手。
我试图查看我的 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;
}
解决方案
<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
一点!
推荐阅读
- java - 如何将备用元素添加到字符串数组
- microsoft-graph-api - /me/activities 请求 Microsoft Graph Explorer 成功 200 响应,但“值”为空:[]
- authorization - 基于声明的授权是否适合单个资源
- java - 需要帮助来理解字符串长度逻辑
- unit-testing - GitLab 中的代码覆盖率始终未知
- apache-kafka - 有没有办法使用千分尺在电报中获取卡夫卡流和骆驼指标
- javascript - div 内的 javascript 选项丢失(在 div 刷新后)
- javascript - 是否使用 AJAX 检查登录状态?
- git - 为已删除的引用保留 reflog
- winforms - 当 != 检查时,2 个相同类型的对象返回 true