Easily change images WITHOUT any CSS or JS

preview_player
Показать описание
The picture element is awesome 🙂

#css

--

Come hang out with other dev's in my Discord Community

Keep up to date with everything I'm up to

Come hang out with me live every Monday on Twitch!

---

Help support my channel

---


---

I'm on some other places on the internet too!

If you'd like a behind the scenes and previews of what's coming up on my YouTube channel, make sure to follow me on Instagram and Twitter.


---

And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!
Рекомендации по теме
Комментарии
Автор

I love how you called me out right up front, background & media query is exactly what I would have done. This is neat!

brianmmdev
Автор

This is great! And it also lets you select images based on browser theme by adding:
media="(prefers-color-scheme: dark)"

snailedlt
Автор

I have this exact situation right now at work and im going to make use of the picture tag so fast it will make my lead dev`s head spin around

cortarelva
Автор

but... (min-width: 600px) still a CSS syntax...
hehe just kidding, you did a great job, Kevin! thanks for sharing new knowledge

triteraerlangga
Автор

Your channel is still absolutely underrated! Thank you!

igordasunddas
Автор

I just did this challenge the other day and got the image working with messy media queries. Will try this method.

BNakato
Автор

omg... picture tag i had used in the past but somehow having forgotten it ever since. So nice to have those shorts to get reminded of useful things!!

soppilif
Автор

Wow! Short videos that instantly relieve my headache.

arnelGo-fjqc
Автор

you are crazy good at teaching CSS. Thankyou

universallyapplied
Автор

frontend mentor has some of the best beginner friendly practice projects. Like if you've solved this challenge.

gautamjuyal
Автор

This is not only exactly what I need, it's a better version than I could have hoped for and what I'd been planning to use. Thank you!

BrendanMcGinley
Автор

You're literally the God of CSS, unlocking CSS abilities within the HTML tags itself 😭

naimas
Автор

I was contemplating which one to use, I was leaning towards the picture but now I’ve seen you use picture I feel so much better 🤣

ekowanin
Автор

Omg! - What a great tip! - Thank you for taking the time to share this with us. :)

hashone
Автор

This also works for image format fallbacks! Serve an AVIF image with Jpeg as a backup for older browsers.

AJman
Автор

This is extremely semantic, fulfilling the purpose of semantic html usage.

sudarrshang
Автор

I like the way you explain each concept, pretty easy to follow 😃

_ANDRZ_
Автор

It's wonderful to know this! Thank you!🤩

j
Автор

Omg I was literally working on this exact challenge! Thank you for the info!

arikiri_
Автор

nice, this is the project i did few weeks back

hianshul