How can I make the default mouse cursor disappear on a larger desktop screen but reappear when the screen is resized smaller in Webflow?

Published on
September 22, 2023

To make the default mouse cursor disappear on a larger desktop screen but reappear when the screen is resized smaller in Webflow, you can use custom code and media queries. Follow the steps below:

  1. Open your Webflow project and navigate to the page where you want to hide the cursor.
  2. Click on the Settings icon in the left sidebar, and then select "Custom Code".
  3. In the Head Code section, paste the following CSS code:
@media (min-width: 1024px) {  html {    cursor: none;  }}
  1. This code targets screens larger than 1024 pixels wide and hides the mouse cursor by setting its style to "none".
  2. Save the changes and publish your site.

Now, the default mouse cursor will be hidden on screens larger than 1024 pixels wide. To make it reappear when the screen is resized smaller, follow these additional steps:

  1. Go back to the Custom Code section for the same page.
  2. In the Head Code section, add the following code:
@media (max-width: 1023px) {  html {    cursor: default !important;  }}
  1. This code targets screens smaller than or equal to 1023 pixels wide and sets the cursor style back to the default (visible) using the !important rule.
  2. Save the changes and publish your site.

Now, when the screen size is smaller than or equal to 1023 pixels, the cursor will reappear.

By using these media queries and custom code, you can control the visibility of the default mouse cursor based on different screen sizes in Webflow.

Additional Questions:

  1. How do I hide the mouse cursor in Webflow?
  2. Can I customize the appearance of the mouse cursor in Webflow?
  3. How can I change the mouse cursor style on different pages in Webflow?