+ 1
Custom Cursor
Okay so i did this yesterday and it worked but not i forgot how to do it, sad. That rotating box is supposed to be the cursor. Its also giving me an error but i dont get it https://code.sololearn.com/WlQ3Ol8OeE2z
36 Answers
+ 3
This leaves some good lessons, which I recommend you keep:
1. Always document your code. Everyone forgets the reasoning behind code written a while ago. Documenting protects you from that, and also allows others to understand and help.
2. Think first logic, then code. This makes the difference between improving the code and getting lost in it. With the logic clear in your mind, you can mantain it and also explain it to whoever can contribute.
3. Make communication clear and straight. We can't read each other minds, so we have to tell each other what we think.
That said, I can't understand your last questions.
+ 1
Your move function takes one argument, but is called with zero arguments.
What was this object "mouse" supposed to be?
+ 1
Your Mom I refer to the code.
The function asks for an argument. What should it contain?
+ 1
But it's your code... What did you intend with the argument?
0
it was supposed to move the mouse
0
idk what it should contain? do u know? It should contain something in those 2 documents somethin to make that mouse move but idk what that somethin is
0
i dont think the mouse object is going to work
0
i was trying to remeber what i did yesterday cus it worked but now i forgot. i wanted that argument to help me move the cursor
0
Okay so i got it working now, but 3 things. My :active is not working and when it does work my transform: scale(.9); is somehow growing?? and resetting. also my @keyframes spin2 is not working
0
thanks. (first problem) so basically my css cursor:active i did transform: scale(.9); when i run the code and press down on my mouse or keypad u can see a change and that change is my @keyframes stopping even though i have animation @keyframes in my css :active (second problem). And when u hold down ur mouse for maybe like 10 seonds or so u can see that my cursor is kind of like growing. (third problem) In javascript where u see .style.left = mouse.clientX - 0and .style.top = mouse.clientY - 0. this piece of code makes it so i cant use my css :active and it wont work u have to spam. u can try the code yourself and see the bugs. also that same piece of javascript code when u does mouse.clientX = 20px and mouse.clientY = 20px. the css :active does work which makes no sense to me
0
Sorry, I'm struggling a lot to understand your question. What I got is the parts about the cursor stopping and growing. I ran the code a couple times but neither happened. I'll try on a computer to see if I can reproduce.
Let's break the problem in parts, starting by the first.
1. What is the relationship between the scale property, keyframes and the animation?
2. In which system did you see the stopping problem? Was it in Code Playground?
0
Yes, i am using code playground. The scale :active property will on work on a computer btw. I dont really understand you question “1” where is says whats the relationship between the scale property.
0
Your Mom I probably got everything wrong about the problem. I tested in a computer too, in Firefox, and didn't see the problem. Even pasted the code in HTML, CSS and JS, and everything passed. Let's try to set it straight:
1. Pls describe problem 1, in a concise way, without elements not related.
2. Pls describe the system where you saw the problem occur.
0
theres no error. Its working just not how i intended it to. What do u mean by system?? I cant really make it any simpler by just saying hold down ur mouse and wait. u will see a change in the cursor
0
System would be wherever you run the app in. For example, I ran in an Android phone and in Firefox, in a Linux notebook. Maybe versions and so on until we spot a relevant difference.
Anyway, I really won't be able to help you. I can't reproduce the problem neither understand what triggers it.
0
Well i ran it on laptop in google. And in app on my phone. i can try to run it on firefox
0
Okay, so finally i tried it on firefox. I see what u mean now. can u try my code on google?
0
Google Chrome? What's the version you're running? What's your operating system?