Custom Cursor on HTML5 Video
-
Dear @Tim-B
body { cursor: url(http://timbieker.com/wp-content/uploads/2021/01/tb_mousecursor2-e1611082846302.png) 4 12, auto !important; } a { cursor: url(http://timbieker.com/wp-content/uploads/2021/01/tb_mousecursor_white-e1611083187935.png) 4 12, auto !important; }
"I would like the cursor to stay how it is and only change to my alternative cursor when you can click on something (play icon)"
When clicking 'play' on your HTML5 Videos you would like the cursor to switch to an alternate?
Talk soon & have a wonderful day :)
Richard -
Hi Richard,
no I would like my cursor to behave the same as on the rest of my page. So the main cursor (currently orange) for everything as well as being over the video div. And then the alternate one (currently white) over the clickable play icon.
Cheers.
Add:
This would also apply to the intro feature as well. There it should be white as well then, as its a "clickable moment"
-
Dear Tim! @Tim-B
This cursor:
cursor: url(http://timbieker.com/wp-content/uploads/2021/01/tb_mousecursor2-e1611082846302.png) 4 12, auto !important;
It can be allocated to any element.
You just need to specify, for instance the 'play' i see returns to the standard 'hand' cursor. This is what you don't want and to prevent this we could add:img.html5video-customplayicon { cursor: url(http://timbieker.com/wp-content/uploads/2021/01/tb_mousecursor2-e1611082846302.png) 4 12, auto !important; }
You can find out the element you wish to target when inspecting a page's HTML structure. You can do this with a browsers "developer tools"
https://www.hostinger.com/tutorials/website/how-to-inspect-and-change-style-using-google-chrome
Applying the above code to your 'Custom HTML & CSS' area should be correct.
If you need any help with another part of your website and applying a cursor, let me know and i will do my best to help :)
Have a wonderful day Tim & best wishes
Richard -
Thank you Richard!
This worked indeed. Thanks for the tip with inspecting. I couldn't figure out the elements to address them properly in css. Its all trial and error for me regarding this..
Great to have such kind and super on point help here in the forum!
Cheers,
Tim -
Nevermind, figured it out like this:
.html5video .html5-video-placeholder-image.h100 img {
cursor: url(https://myurl.com/wp-content/uploads/2021/03/image.png) 4 12, auto !important;
} -
Oh and then if you want the cursor also to be the same when you're hovering the video it would look something like this:
.html5video video.playpauseonclick { cursor: url(https://favoritanimal.com/wp-content/uploads/2021/03/favorit-animal-cursor-green-01.png) 4 12, auto !important; }
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it