Today I Learned - Rocky Kev

TIL you can make your cursor display images

POSTED ON:

TAGS:

You can use CSS to make your cursor display images.

.card-image-cursor {
background-color: #D11A5A;
cursor: url(https://stackdiary.com/tools/assets/img/tools/html-beautifier.svg), auto;
}

The cursor element allows you to use url(). mdn

It's required to include a fallback keyword (like auto) in case the image is broken.

So yes, you can totally make it into pizza if you want.

via 10 Useful CSS Tricks for Front-end Developers


Related TILs

Tagged:

TIL the alternate keyword

If 'alternate' appears along with the stylesheet keyword, the linked file is an alternative stylesheet. It won’t be applied to the document, but it will be ready for when we need it.

TIL Logical Properties

For that sweet sweet Internationalization you want to avoid directional words like 'left', 'right', 'top', and 'bottom'.

TIL Using pseudo-classes in your querySelector!

let notTuna = document.querySelectorAll('.sandwich:not(.tuna)')