Code để tạo ra con chuột với hình tròn bao quanh
Hãy sao chép code dưới đây và dán ở phần trên thẻ </body>.Dùng cho Blogspot template PlusUI và các template khác.
<div class='cursor'>
<div class='inner-cursor'/>
</div>
<style>
.cursor {
position: fixed;
width: 30px;
height: 30px;
border-radius: 50%;
background-color: transparent;
border: 2px solid #d1cfcf;
pointer-events: none;
z-index: 9999;
}
.inner-cursor {
position: fixed;
width: 10px;
height: 10px;
top : 100%;
left : 100%;
transform: translate(100%, 100%);
border-radius: 50%;
background-color: transparent;
border: 2px solid #d1cfcf;
pointer-events: none;
z-index: 9999;
transition: all 0.01s ease-in-out;
}
</style><script>
document.addEventListener("mousemove", function(event) {
const cursor = document.querySelector(".cursor");
const innerCursor = document.querySelector(".inner-cursor");
cursor.style.left = event.clientX + "px";
cursor.style.top = event.clientY + "px";
innerCursor.style.left = event.clientX + "px";
innerCursor.style.top = event.clientY + "px";
});
</script>
Lưu ý : Nhớ phải chat theo nội dung lành mạnh!
Nguồn:
DnnisCode


2 nhận xét