css - CSS - 几秒钟后使鼠标指针消失
问题描述
目标是在我将鼠标悬停在视频(例如 youtube)上一段时间后隐藏我的鼠标指针,因为我需要使用 css。
这是我现在的动画。
#container{
&:hover{
cursor: pointer;
.video-controls-bar{
opacity: 1;
}
.bottom {
margin-bottom: 44px;
}
}
}
这是我的控制栏,当我将鼠标悬停时,我的 div 底部会出现,但现在我需要在几秒钟后隐藏鼠标。提前致谢
解决方案
您可以使用如下关键帧动画:
button:hover {
animation: hideMouse 4s;
}
@keyframes hideMouse {
0% {
cursor: pointer;
}
99% {
cursor: pointer;
}
100% {
cursor: none;
}
}
推荐阅读
- reactjs - 通过回调显示dash数据表
- go - Go protobuf 包冲突
- java - 覆盖 Tomca7 Maven 插件配置
- flutter - 在 GlobalKey 上调用 popUntil 时返回 null 的路由
- sql - Postgres SQL 状态:22P02 - 整数的无效输入语法
- asp.net-core - 将 Quartz 添加到 Web API 项目。性能问题
- karate - 空手道 UI 自动化,是否可以使定位器动态化
- c# - 新程序安装后:System.Runtime.InteropServices.SEHException (0x80004005):
- python - 在 Python 中创建“相对”和“分组”图表的组合
- angular - 如何保护子路由并在子路由之间导航?