paprockin Posted April 20, 2021 Share Posted April 20, 2021 Site URL: https://krill-bassoon-kb9t.squarespace.com I am working on this website for a community organization and was trying to get these images to darken on hover. Each image is set to "poster" under the design tab and has a title with no subtitle. My code is seen below. .sqs-block-image:hover .image-card-wrapper { filter: brightness(1); transition: .3s; cursor: pointer;} .sqs-block-image:not(:hover) img { filter: brightness(1);} .sqs-block-image:hover { filter: brightness(.5); transition: .3s; cursor: pointer;} This code darkens the image but the title that is juxtaposed on top of the image is also darkened. Is there a way to adjust this code to darken only the image? The website is https://krill-bassoon-kb9t.squarespace.com/schoolhistory Link to comment
paprockin Posted April 20, 2021 Author Share Posted April 20, 2021 Just wanted to say that after playing around for a long time, I got my desired effect to work! Below is the CSS I ended up using if anyone also wants to accompish this. .design-layout-poster:hover .image-card-wrapper { filter: brightness(1); transition: .3s; cursor: pointer;} .design-layout-poster:not(:hover) img { filter: brightness(1);} .design-layout-poster :hover { filter: brightness(.8); transition: .3s; cursor: pointer;} Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.