If you want to change an image on hover in Squarespace, there are a few steps you’ll need to take. First, you’ll need to create two separate images that will be swapped out on hover.
Next, you’ll need to upload both images to your Squarespace site and add them to your image gallery. Finally, you’ll need to add a bit of code to your site’s CSS file to tell Squarespace how to swap the images on hover.
Creating the Images
The first step is to create the two images that will be swapped out on hover. These images can be anything you want, but they should be of the same size and shape. For this example, we’ll be using two square images.
Once you have your two images created, the next step is to upload them to your Squarespace site.
Uploading the Images
To upload the images, log into your Squarespace account and go to the “Content” section of your site’s dashboard. In the “Content” section, click on the “Files” tab.
On the “Files” page, click the “Upload Files” button and select both of your images from your computer. Once both images are uploaded, click on the “Finish” button.
Your images will now be added to your site’s image gallery. To view your image gallery, go to the “Design” section of your site’s dashboard and click on the “Images” tab. On the “Images” page, you should see both of your images listed.
Adding the Code
Now that your images are uploaded, it’s time to add a bit of code to your CSS file so that Squarespace knows how to swap the images on hover. To do this, log into your Squarespace account and go to the “Design” section of your site’s dashboard.
In the “Design” section, click on the “Custom CSS” tab. On the “Custom CSS” page, paste the following code into the box:
.thumbnail-image { background-image: url(IMAGE-1-URL); } .thumbnail-image:hover { background-image: url(IMAGE-2-URL); }
Be sure to replace IMAGE-1-URL with the URL of the first image and IMAGE-2-URL with the URL of the second image. Once you’ve added this code, click on the “Save & Publish” button at the bottom of the page.
How Do I Change an Image on Hover in Squarespace?
If you want change an image on hover in Squarespace, there are a few steps you’ll need take. First, you’ll need create two separateimages that will be swapped out on hover.
Next, you’ll need upload bothimages website and add themyour image gallery Finally, you’ll need add a bit codeyour siteto CSS file tellSquarespace how swapimages hover.
Creating Images The first step is create twoimages that will be swapped outon hover Thesecan be anythingyou want but they should becameof sameand shape For this example we’llusing twosquare.
Uploading Images To uploadlog intoSquarespace accountgo Content sectionofdashboard InContentclick Files tab OnFiles page click Upload Files select bothofimages fromyour computer Onceimages are uploaded click Finish.
Your imagenowbe addedtoimage gallery viewgallerygo Designofdashboard click Images tab OnImages pageyousee bothlisted.
Adding Code Now thatare uploaded it’s timeadd a bit codeto CSS file sothatknows howswapon hover doTothis log intoSquarespacethe Design sectionandto Custom CSS tab On Custom CSSpage paste following codeinto box:
. thumbnail -image {background -image:url (IMAGE -1 -URL);}. thumbnail -image:hover {background -image:url (IMAGE -2 -URL);}
Be sureto replace IMAGE -1with URL offirstand IMAGEwith URL ofsecondsave publish bottomthe