javascript - 鼠标悬停在 Chrome 浏览器上的日期和时间选择器图标上时的光标指针
问题描述
我有一个简单的光标问题:chrome 浏览器中的指针 css,但我 2 天都无法解决这个问题。我将在下面附上我的代码。请在 Chrome 浏览器上运行。您将无法在 Firefox 浏览器上看到图标。只有铬有效...
<head>
<title>Page Title</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<style type="text/css">
input{
cursor: pointer;
}
</style>
</head>
<body>
<input type="date" id="filepicker" name="fileList" webkitdirectory />
<br/>
<input type="time" id="filepicker" name="fileList" webkitdirectory />
</body>
如果我将鼠标悬停在图标(红色部分)上,那么它们只会出现箭头。我想将其更改为指针。如果您有经验,请帮助我。
谢谢
解决方案
<style type="text/css">
input {
cursor: pointer;
}
input::-webkit-calendar-picker-indicator {
cursor: pointer;
}
</style>
<input type="date" id="filepicker" name="fileList" webkitdirectory />
<br/>
<input type="time" id="filepicker" name="fileList" webkitdirectory />
推荐阅读
- mysql - 全文搜索未找到某些特定词,这些词未包含在停用词中
- java - 如何检查java字符串是否包含数字和字母?
- python - Python套接字:接收帧队列管理
- python - 测试字符串长度是奇数还是偶数的函数
- jestjs - 与 esm 模块或 commonjs 一起使用的 jest 文件转换
- python - 在 Bokeh 中使用 hovertool 时仅显示一个工具提示
- amazon-web-services - AWS-Amplify project-config.json' 不存在错误
- react-native - 错误:找不到默认重定向 url。如果您使用裸工作流程,则需要自己提供
- flutter - Flutter 可拖动的小部件,可以单击或拖动以移动到 DragTarget
- c# - 如何沿侧基类实现受约束的泛型