Skip to content

Commit

Permalink
Merge pull request #66 from Manishkr1007/main
Browse files Browse the repository at this point in the history
Adding custom cursor using html css and js
  • Loading branch information
jaysomani authored Jan 18, 2024
2 parents 3bcb951 + 85a7e71 commit 1265c5c
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"liveServer.settings.port": 5502,
"liveServer.settings.port": 5503,
"git.ignoreLimitWarning": true
}
13 changes: 13 additions & 0 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,17 @@ body.offcanvas-menu:before {
.text-black {
color: #000 !important;
}
#cursor {
height: 20px;
width: 20px;
background-color: #16abab;
border-radius: 50%;
position: fixed;
z-index: 99;
transition: all linear 0.1s;
}



.userlink {
color: white;
Expand Down Expand Up @@ -26302,6 +26313,7 @@ screen and (max-height: 300px) {
display: none;
}
}

/* swiper-slide button positioning */
.button-explore{
position: absolute;
Expand Down Expand Up @@ -26375,3 +26387,4 @@ screen and (max-height: 300px) {
left: 27%;
}
}

3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ <h3 id="hh"></h3>
<!-- ////////////////////////////////////////////////////////////// -->
</header>
<!-- Swiper-->
<div id="cursor"></div>
<div id="cursor-blur"></div>

<section class="section swiper-container swiper-slider swiper-slider-corporate swiper-pagination-style-2" data-loop="true" data-autoplay="5000" data-simulate-touch="true" data-nav="false" data-direction="vertical">
<div class="swiper-wrapper text-left">
<div class="swiper-slide context-dark" data-slide-bg="images/italy-517522957.jpg">
Expand Down
15 changes: 15 additions & 0 deletions js/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
"use strict";

var crsr = document.querySelector("#cursor");
var blur = document.querySelector("#cursor-blur");

document.addEventListener("mousemove", function (dets) {
crsr.style.left = dets.x + "px";
crsr.style.top = dets.y + "px";
blur.style.left = dets.x - 250 + "px";
blur.style.top = dets.y - 250 + "px";
});





(function () {
// Global variables
var userAgent = navigator.userAgent.toLowerCase(),
Expand Down

0 comments on commit 1265c5c

Please sign in to comment.