blurred borders on images

Hi, i'd like to create this effect, is there an easy way to do it with css? The borders of the image is blurred
23 Replies
Mannix
Mannix3y ago
looks like 2 same images on top of each other and the bigger one is blurred https://codepen.io/MannixMD/pen/jOxoJZx
Ã̶̅n̴̊͑k̴̾͌s̵̒̐e̵͗̒l̴̿͋
the outside border should have straight lines like no blurred edge
Mannix
Mannix3y ago
can you link to this
Ã̶̅n̴̊͑k̴̾͌s̵̒̐e̵͗̒l̴̿͋
yeah it's a design
Mannix
Mannix3y ago
i guess you could blur the image in photoshop right now i can't see this be done with just css
Ã̶̅n̴̊͑k̴̾͌s̵̒̐e̵͗̒l̴̿͋
yeah it really is complicated but thanks for helping :p
Mannix
Mannix3y ago
i think i did it check the pen
Ã̶̅n̴̊͑k̴̾͌s̵̒̐e̵͗̒l̴̿͋
oh oh nice thanks
Mannix
Mannix3y ago
it's 3 images not 2 🤣
MarkBoots
MarkBoots3y ago
with a lot of clippath points https://codepen.io/MarkBoots/pen/jOxoRbX
Mannix
Mannix3y ago
noice Mark 😄
MarkBoots
MarkBoots3y ago
i was hoping to manage it with only 1 image, but can't think of a way maybe with svg filters, but that's not my cup of tea
Ã̶̅n̴̊͑k̴̾͌s̵̒̐e̵͗̒l̴̿͋
that clip path is insane xD
MarkBoots
MarkBoots3y ago
with mask-image it is a "bit" more readable/predictable https://codepen.io/MarkBoots/pen/MWGdRvg
MarkBoots
MarkBoots3y ago
backup image (pen will be removed in few days)
Ã̶̅n̴̊͑k̴̾͌s̵̒̐e̵͗̒l̴̿͋
how did you make this clip path?
MarkBoots
MarkBoots3y ago
with my mind 🙂 a polygon is made with x,y positions and each point separated with a comma first i go around the whole image, then i shift inwards with the size of the border and go back the other way around (with the border-size in mind) ive put some comments in the pen, so you can see
Ã̶̅n̴̊͑k̴̾͌s̵̒̐e̵͗̒l̴̿͋
ah i see, thanks!
capt_uhu
capt_uhu3y ago
unless i'm missing something wouldn't a clip-path: inset(2rem); on the top image do the same thing? https://codepen.io/jsnkuhn/pen/qBYGzgd
MarkBoots
MarkBoots3y ago
the outer edge will still be blurred outside. but with an overflow hidden on the parent that will work too yes. good call
capt_uhu
capt_uhu3y ago
other thought is the first img should probably get a aria-hidden=true to hide it from screen readers
Want results from more Discord servers?
Add your server