我已经创建了一个自定义SVG游标,并且在响应链接时遇到了问题。从下面的示例中可以看到,您无法打开链接
https://codepen.io/anon/pen/dZymZK
$(document).mousemove(function(e) {
$(".custom-cursor").position({
my: "center center",
of: e,
collision: "fit"
});
});:root {
cursor: url(http://chrishawkins.us/blank.cur), none;
}
.custom-cursor {
position: absolute;
cursor: none;
}
a:hover {
cursor:pointer !important;
}<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<svg id="pointer" height="50" width="50">
<polygon points="1,1 49,10 20,20 10,49">
<!-- coordinates are in x,y format -->
<!-- points go clockwise around the polygon -->
</svg>
<a href="bbc.co.uk" target="_blank">bbc</a>
发布于 2017-10-28 19:37:15
请将以下属性指定给选择器#指针:
position: relative;应该管用的。
https://stackoverflow.com/questions/46993598
复制相似问题