CSS cursor input / output

I have buttons to increase or decrease the content. In firefox, the cursor works well (its like a magnifying glass with +). But in chrome, I have a default pointer. This is my code:

.button.zoom-in {
   ...
   cursor: zoom-in;
}

Can someone help me why this works in forefox and chrome? In addition, other cursors such as help, move, pointer ... also work in chrome.

+4
source share
2 answers

For Chrome, you should use the prefixed-property value:

.button.zoom-in {
   ...
   cursor: -webkit-zoom-in;
   cursor: zoom-in;
}

Here is the jsfiddle .

+4
source

This Mozilla page is a great link to various cursors, as well as browser compatibility for everyone.

Chrome 1.0+, Firefox 1.0+, Opera 11.6+ Safari 3.0+ . / IE.

.button.zoom-in {
    cursor: -moz-zoom-in; 
    cursor: -webkit-zoom-in;
    cursor: zoom-in;
}
+1

Source: https://habr.com/ru/post/1542914/


All Articles