I had to create editable text in lab 29 that would have a shadow of distinct colors that would move the mouse differently. To do this, I developed a shadow) (feature that utilizes offsetLeft and offsetTop for shadow positioning. Then I puttextShadow design using text.style.textShadow (this is what updated the stance to the variable offsetLeft and offsetTop named yWalk and xWalk). Then I attached the shadow feature to the mousemove event listener to make it operate on mouse movement.
I did this DOM-based javascript lab. I learned how to use javascript and various event characteristics such as offsetTop and offsetLeft to style text shadow. Some recommendation I'd offer is to use jQuery because it's much more effective than javascript vanilla. We wouldn't have to use querySelector), (only $(element) could be used.
I did this DOM-based javascript lab. I learned how to use javascript and various event characteristics such as offsetTop and offsetLeft to style text shadow. Some recommendation I'd offer is to use jQuery because it's much more effective than javascript vanilla. We wouldn't have to use querySelector), (only $(element) could be used.
Comments
Post a Comment