Image blur

Open to all! Ask other shopowners for help.
Post Reply
LeeFoster
Contributor
Posts: 263
Joined: Sun Feb 28, 2021 9:41 pm
Phoenix Version: v1.0.8.20
Has thanked: 1 time
Been thanked: 5 times

Image blur

Post by LeeFoster »

I'm working on a store at the moment and would like to have the outer edges of the product images blurred. I have managed to do this on the index pages be using the below css and adding image-blurred-edge class to the product cards.

Code: Select all

.image-blurred-edge {
	position: relative;
}

.image-blurred-edge:before {
    display:block;
    content:'';
    position:absolute;
    width:100%;
    height:100%;
    -moz-box-shadow:inset 0px 0px 10px 8px #222;
    -webkit-box-shadow:inset 0px 0px 10px 8px #222;
    box-shadow:inset 0px 0px 10px 8px #222;
	pointer-events: none;
}
However, when I try to do the same on the pi-gallery it only blurs 3 of the edges.
blur.PNG
Any ideas on what the issue might be or even if there might be a better way to do this?
You do not have the required permissions to view the files attached to this post.


Join The Code Co-op to get access to your library in the Code Co-op Forum
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: Image blur

Post by heatherbell »

LeeFoster wrote: Tue Jan 03, 2023 11:54 am However, when I try to do the same on the pi-gallery it only blurs 3 of the edges.
Any ideas on what the issue might be or even if there might be a better way to do this?
https://stackoverflow.com/questions/247 ... e-with-css
gives a variety of methods, some simpler than your example.
Internet search for "css blur edge of image" gives even more.
The pi-gallery image is probably having the css applied (check with Dev Tools) but the right edge of the image is not shown so maybe needs to be wrapped in another div with the css.


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply