High-resolution custom cursor in CSS for improved display clarity

I'm having trouble finding information on this particular subject. My goal is to create a simple custom cursor using CSS. Currently, I have the following code:

cursor: url('img/cursor_left.png'), auto;

The cursor appears as expected, but it's slightly blurry due to compatibility issues with retina displays. Does anyone have any suggestions on how to resolve this issue?

Thank you, Angelo.

Answer №1

Although I have not personally tested this method, it appears that using the image-set feature in CSS is a viable option:

cursor: url('img/cursor_left.png'), auto;
cursor: -webkit-image-set(
  url('img/cursor_left.png') 1x,
  url('img/cursor_left_hi.png') 2x
), auto;

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Tips on how to automatically scroll a display flex div to the bottom

Traditionally, setting scrollTop of a div can be used to scroll it to the bottom, as shown in this example: http://jsfiddle.net/jPVAf/50/ However, if the div has the style display: flex, the technique mentioned above will not work. Here is an example demo ...

There seems to be an issue with vertically centering row divs in Bootstrap

Struggling to center a row div vertically in an ASP.NET MVC project? Despite numerous attempts, the content remains at the top. Here's a quick fix with some eye-catching colors to illustrate the issue: Site.css: html, body { height: 100%; } #mm ...

Immersive full-screen dynamic backdrop

I am looking to create a dynamic full-size background with a smooth fade effect. Currently, I have implemented the following code: jsfiddle html: <img src="http://elegantthemes.com/preview/InStyle/wp-content/uploads/2008/11/s-1.jpg" /> <img src= ...

Comparing the features of Semantic-ui to bootstrap's forms-controls-static

Are there any similar classes in Semantic-UI to the forms-controls-static class in Bootstrap? This class allows plain text to be placed next to a form label within a form. You can find more information about this feature by visiting the following link: ht ...

Percentage-based framework for CSS grid system

Exploring the world of CSS grids has been a fascinating learning journey for me. After delving into my research and consulting resources like: http://css-tricks.com/dont-overthink-it-grids/ I've noticed that percentage-based grids generally make the ...

Link the same CSS file with multiple HTML pages

Currently, I am in the process of creating an external CSS file specifically for my homepage. The only issue I am encountering is that while I know how to resolve this problem for one HTML page, I am uncertain about how to address it for other pages. For ...

How can I set random background images on my Wordpress site?

I am currently using WP version 3.5.1 along with a twenty twelve child theme and PHP 5.2 on my server. I have been attempting to implement a php script (which has successfully worked on my other websites) to display random background images, however, it se ...

What is the best way to position a div on the left side when it's large and move it to the

In my coding, there is a particular div element: <div id="UnitInfoDiv" class="form-group row hidden"> <div id=@UnitPartialViewHtmlId class="row"></div> <div class="row"> <div class="col-md-6"> Is ...

When viewed in IE11, each element with { display: table-cell } styling is displayed on a separate line

Here is the HTML code snippet (JSFiddle): <div class="form-group tabled-contents"> <div style="display: table-row;"> <input id="BodyContentPlaceholder_TxtCustomerId" type="text"> <input id="BodyContentPlaceholder_B ...

Trying to align a telerik component in a bootstrap modal

I'm struggling to align the radmediaplayer telerik control in the center, but I can't seem to get it right. Any assistance would be greatly appreciated. Thank you. <asp:Panel ID="pnlModal3" runat="server" role="dialog" CssClass="modal fade"&g ...

Adjust Font Size to Fit Window

Trying to figure out the perfect font size for my webpage. Currently, I've set it at -webkit-xxx-large because it looks great in my window. What I really want is for the text to always fit within the width of the window, regardless of how big or smal ...

Align list items vertically, even when they have varying heights

I am currently working on creating rows of images, with 3 images in each row. The data being used is dynamic, however, I have provided some sample HTML and CSS below: ul { margin: 0; padding: 0; list-style: none; width: 900px; } li { margin: 0; padding: ...

Selecting the next element in the DOM using Javascript

Here is the structure of my current setup: <div class="wrapper"> <div class="first"> <a class="button" href="">click</a> </div> <div class="second"> <div class="third"> S ...

What is the best way to set up a side-opening feature in the UI design?

I am having trouble with the Amoclan shape transitioning to the next side. I need the transition to occur exactly as specified in the documentation, but for some reason it is still moving on to the next side. <html> <head> <script src=" ...

Update picture for mobile and tablet view (Semplice template)

I am currently using the Semplice Theme for my portfolio website and I have come across a little issue. I want to figure out how to change an image specifically on smaller devices like mobile phones and tablets. However, I'm still quite new to coding. ...

Reorganizing Bootstrap 5 columns as the screen size changes

I need to change the display order of columns in bootstrap Currently I have two columns side by side in one row like this: Col A - Col B (on all screens except mobile devices) However, when the screen size is reduced or viewed on a mobile device, I want ...

Expansive picture feature within jQuery Mobile

I need help with displaying a large image (685 × 900, only 25kb in PNG) in the 'content' section so that it adjusts automatically for different screen sizes and allows users to zoom in using their fingers. Currently, I have this code: < ...

What is the best way to incorporate a search feature within Bootstrap cards?

I've been struggling to incorporate a search feature within my bootstrap cards. Despite trying various online methods, none have proven successful for me so far. Below is my HTML code - any assistance in implementing a search filter into my app would ...

Material UI - Array of Chips

I have been working on creating a ReactJS component that displays an array of chips with unique styling for each one. To achieve this, I created individual makeStyles classes for the chips. However, I encountered difficulties in dynamically changing the cl ...

What is the best way to align this button beside my form field instead of having it appear two lines below?

I am currently in the process of learning Django as I work on creating a website. However, my knowledge of HTML, CSS, and JavaScript is limited. To tackle this issue, I decided to use a website builder to generate a template for me, which I can then modify ...