Website Building » Squarespace » How Do I Add Hover Effect on Image in Squarespace?

How Do I Add Hover Effect on Image in Squarespace?

Last updated on December 24, 2022 @ 10:06 am

There are many ways to add hover effect on image in Squarespace. The most common and easiest way is to use the CSS3 :hover pseudo-class.

This will allow you to add a hover effect to any element on your Squarespace website without having to use JavaScript or jQuery. All you need is some basic knowledge of HTML and CSS.

To add a hover effect to an image in Squarespace, simply use the following code:

PRO TIP: This article provides instruction on how to add a hover effect to images in Squarespace. However, it is important to note that adding hover effects to images can make them difficult to use for people with disabilities. If you are using hover effects on images for important content, make sure to also provide a text alternative that does not require the use of a mouse.

img {
-webkit-transition: all .3s ease;
-moz-transition: all .3s ease;
-o-transition: all .3s ease;
transition: all .3s ease;
}

img:hover {
-webkit-transform: scale(1.1); /* Safari and Chrome */
-moz-transform: scale(1.1); /* Firefox */
-ms-transform: scale(1.1); /* IE 9 */
-o-transform: scale(1.1); /* Opera */
transform: scale(1.1); /* W3C */
}

This code will work on all modern browsers including Internet Explorer 9+. The only exception is Opera Mini which does not support CSS transitions.

If you want to add a more sophisticated hover effect, you can use CSS3 transforms such as rotate, skew or translate. For example, the following code will rotate an image by 10 degrees on hover:

img {
-webkit-transition: all .3s ease;
}

Kathy McFarland

Kathy McFarland

Devops woman in trade, tech explorer and problem navigator.