I'm a total beginner who has no clue what is he doing and trying to create a custom cursor effect for our website at my job with CSS and JavaScript. Everything works fine except I can't create a triangular shape. I've read articles about using borders but decided to try a different way, but it's not working. The code is attached below. Can anyone tell me what am I doing wrong?
body {
width: 30%;
padding-bottom: 21.27%; /* = width / 1.41 */
position: relative;
overflow: hidden;
}
#myCustomCursor {
position: fixed;
width: 100%;
height: 100%;
background: #CC2FFA;
top: var(--y, 0);
left: var(--x, 0);
transform-origin: 0 100%;
transform: rotate(45deg);
transform: skew(20%);
transform: translate(-50%, -50%);
mix-blend-mode: difference;
pointer-events: none;
z-index: 99999;
}
#myCustomCursor.myCursorHoverState {
width: 160px;
height: 160px;
background: blue;
}