CSS Image hide

i want to hide a party of image.how can i do it??
10 Replies
Jochem
Jochem•2y ago
https://developer.mozilla.org/en-US/docs/Web/CSS/clip-path or do you mean that you want the image to cover the entire available space, regardless of whether it's the correct aspect ratio? in that case, you'll want this one: https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit
BERSERK
BERSERKOP•2y ago
for the object fit i need to use the background-image but i'm using the img tag
Jochem
Jochem•2y ago
the link I sent you doesn't use background-images Take a look at the examples https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit#examples if it doesn't work, put your code in a codepen and I can take a look a it if you want
BERSERK
BERSERKOP•2y ago
i try it but it doesn't work
Jochem
Jochem•2y ago
tried object-fit, or tried making a codepen?
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Jochem
Jochem•2y ago
It's definitely suggested in the how to ask good questions thread, but a lot of people don't bother. It's hard to enforce, because you can't always create one to demonstrate some issues I tend to make it a rule for myself that I don't put in more effort than the person asking the question did though. I'm not going to spend my time copying code off screenshots or making minimal reproductions for people if they can't be bothered to ctrl+c/v some code into a free website 🤷
BERSERK
BERSERKOP•2y ago
sorry for being late
BERSERK
BERSERKOP•2y ago
Want results from more Discord servers?
Add your server