我为任务使用了自定义光标属性,但它不适用于ie浏览器.我使用了以下代码段.
<html>
<head>
<title>Custom Cursor</title>
<style>
h1{
cursor: url(http://www.franco.it/Images/Lookf.png), auto;
}
</style>
</head>
<body>
<h1>Custom Cursor</h1>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
它适用于Chrome,Firefox和Safari - 除了IE之外的所有内容.有些文章说我应该使用.cur格式,但如何将图像转换为cur?我找不到合适的链接来转换它.
谢谢.
我有一个问题要在伪选择器后的活动图标选择器上实现.以下是我尝试过的代码.
<html>
<head>
<style type="text/css">
.btn{
width:25%;
}
.name{
background: #fff;
color: #000;
text-align: center;
height: 35px;
line-height: 35px;
font-size: 18px;
border: 1px solid;
}
.name:after{
content: "";
position: absolute;
left: 210px;
top: 19px;
background-image: url('dark.png');
width: 15px;
height: 15px;
background-size: 100% auto;
}
.name:after:active{
background-image: url('light.png');
}
</style>
</head>
<body>
<div class="btn name">Submit</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)


建议我使用after伪选择器实现活动选择器的方法.提前致谢.