A Pen by Victoria

Developer
Size
2,090 Kb
Views
8,096

How do I make an a pen by victoria?

What is a a pen by victoria? How do you make a a pen by victoria? This script and codes were developed by Victoria on 02 December 2022, Friday.

A Pen by Victoria Previews

A Pen by Victoria - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>A Pen by Victoria</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="wrapper"> <div class="circle"> <div class="inner-circle"> <div class="dot dot-first"></div> <div class="dot dot-second"></div> </div> </div>
</div> <script src="js/index.js"></script>
</body>
</html>

A Pen by Victoria - Script Codes CSS Codes

.wrapper { display: block; width: 165px; height: 165px; background-color: #A09AC3; position: relative;
}
.circle { width: 165px; height: 165px; border-radius: 50%; background-color: #D8D8D8;
}
.inner-circle { position: absolute; top: 16px; left: 16px; width: 130px; height: 130px; border-radius: 50%; background-color: #A09AC3;
}
.dot-first { z-index:1; width: 15px; height: 15px; left: 57px; top: -16px; border-radius: 50%; position: absolute; background-color: white; border: 1px solid #22D190; cursor: pointer;
}
.dot { opacity: 0.7;
}
.dot::hover { opacity: 1;
}
.dot-second { z-index:2; width: 16px; height: 16px; left: 74px; top: -14px; border-radius: 50%; position: absolute; background-color: white; border: 1px solid #22D190; display: none;
}

A Pen by Victoria - Script Codes JS Codes

const planeToCircle = function(pX, pY, cX, cY, R){ const vX = pX - cX; const vY = pY - cY; const magV = Math.sqrt(vX * vX + vY * vY); const x = cX + vX / magV * R; const y = cY + vY / magV * R; return {x, y};
};
const wrapper = document.querySelector('.wrapper');
const dot = document.querySelector('.dot-first');
dot.onmousemove = function(e) { const p = planeToCircle(e.clientX, e.clientY, wrapper.offsetLeft + wrapper.offsetWidth / 2, wrapper.offsetTop + wrapper.offsetHeight / 2, wrapper.offsetWidth / 2 - 9 ); dot.style.left = (p.x - dot.offsetWidth / 2 - 25) + "px"; dot.style.top = (p.y - dot.offsetHeight / 2 - 25) + "px";
}
A Pen by Victoria - Script Codes
A Pen by Victoria - Script Codes
Home Page Home
Developer Victoria
Username Enieste
Uploaded December 02, 2022
Rating 3
Size 2,090 Kb
Views 8,096
Do you need developer help for A Pen by Victoria?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Victoria (Enieste) Script Codes
Create amazing Facebook ads with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!