Заменить карты значков мыши по умолчаниюJavascript

Форум по Javascript
Anonymous
Заменить карты значков мыши по умолчанию

Сообщение Anonymous »

Я могу заменить курсор мыши в Gmail после решения в переполнении стека. /> Я попытался создать новый элемент div (аналогично стилю ) и добавить его, но все же он не работает.

Код: Выделить всё

// Gmail
var styleA = document.createElement('style');
styleA.innerHTML = "[style*='openhand.cur']{ cursor: grab !important; }[style*='closedhand.cur']{ cursor: grabbing !important; }";
// Google Maps
var styleB = document.createElement('style');
styleB.innerHTML = "[style*='openhand_8_8.cur']{ cursor: grab !important; }[style*='closedhand_8_8.cur']{ cursor: grabbing !important; }";

// Apply new styles defined above
document.head.appendChild(styleA);
document.head.appendChild(styleB);
Какой правильный подход?

Подробнее здесь: https://stackoverflow.com/questions/796 ... -icon-maps

Вернуться в «Javascript»