+ 8

How to control any of logo or text as we want like giving it in left or right by buttons?

Similar as we do in Video Games, like when we want to save our life we give commands to jump ,go left etc. to the character as in the games.

28th Aug 2020, 4:58 PM
TIGRESS
TIGRESS - avatar
4 ответов
+ 5
Hey , it's my request to you that please dont spam any questions And use tags for your questions And also First check for some similar questions ......befor you ask Sorry but i don't know the answer
28th Aug 2020, 5:01 PM
🍎Mi_ra_go
🍎Mi_ra_go - avatar
+ 5
You can make a javascript file, where you can access the logo/text using left/right buttons. Then, when a button is pressed, a function is called. Depending on what function is called, increase or decrease the horizontal positioning of that element. Declare its position as relative in CSS https://medium.com/@theredwillows/moving-an-element-with-javascript-part-1-765c6a083d45#:~:text=style.-,top%20%3D%20(Number(topValue)%20%2B%2020)%20%2B%20%22,littleBox)%3B%20to%20move%20it! Make use of some code from this link.
28th Aug 2020, 5:06 PM
Charitra
Charitra - avatar
+ 5
Thanks for your suggestions.
29th Aug 2020, 3:26 AM
TIGRESS
TIGRESS - avatar
+ 2
At least start CSS and JavaScript lessons. They have it all covered.
28th Aug 2020, 5:06 PM
Raj Chhatrala
Raj Chhatrala - avatar