Комментарии:
Love love loveee this.
ОтветитьRemembered this vid cos I had trouble with position-absolute trick. Much easier, much better.
Ответить❤️❤️
ОтветитьHaha, greatest tip of the day for me. After fighting with multiple mask div, positions and z-index this become trivial 😀
Ответитьim seriously getting to love grid as my current project is a housing management system.
Ответитьwhat if I have more than 1 element inside and want to center it all respecting the flow?
ОтветитьMan fuck html
Ответитьwhy not give class staked background-img?
then display justify and align center
I’ve been watching his videos for a while and only now i realized i wasn’t subscribed😅
ОтветитьI'm 🔙
ОтветитьIf we can build websites using html & CSS for which part of the website do we need Js for?
ОтветитьVery nice loop! :3
ОтветитьThat's genius! I love grid now actually
Ответить.parent-div {
Display: grid;
Place-content: center;
Height: 100vh}
Now you have vertically centred content 🎉
Whats the disadvantage of using absolute positioning?
ОтветитьThat's a fkg fine loop
ОтветитьNow, how you center div
ОтветитьWhat an unbelievably good timing for this one to pop up...
I don't care if this is the "right" way of doing it, it works and that's all I care about
Oh my! Kevin. Is this real? Wowza!! 🎉
ОтветитьDude pls low the resolution I can see your soul and I don't like it XD
ОтветитьWhat’s wrong with using position absolute? It’s much simpler.
ОтветитьOnly problem is totally breaks printing, so don't use it with printing as page breaks don't work inside grid or flex.
Ответить🔥
ОтветитьI hate it for centering, witch is not centering as we thinking ;)
Ответитьman this is the longest short ive ever watched. cant wait to see how it ends.
ОтветитьVery cool ‘why’ loop
ОтветитьWhich ide you used in this video
ОтветитьInfinite loop
ОтветитьWhat is your VS code theme?
ОтветитьI love your videos
ОтветитьNever thought of using grid for a case like this before. Absolutely brilliant. Mind is blown, thanks!
ОтветитьIncredible
ОтветитьBeen trying this with a video element as background and I can't get it to work :'(
ОтветитьWhat does grid-column: 1/-1 and row: 1/-1 do? I tried altering the values, but got no result (tried on codepen)
Ответитьhtml
<div class="stacked"> <h1>Content on top</h1> <img src="" alt=""> </div>
css
.stacked{ display:grid; }
.stacked > *{
grid-column: 1/-1;
grid-row: 1/-1;
/* alternative
grid-area: 1/1; */
}
nonononooooo, too perfect loop. stop doing thaaat
ОтветитьI can't understand this span stuff 1/1 this notation is quite confusing
ОтветитьTHANKS A LOT KEVIN! This makes GatsbyImage a lot easier to use as a background! Thanks!
ОтветитьOh osm I see somewhere else but didn't understand but now im. Thanks 👍🏻.
and can you make more example shorts on grid
You’re bloody good Kevin, great tip
ОтветитьWhich is whyyy.. took me a second!!
ОтветитьI see what you've done with the script at the end. :D
Ответить"..which is why..." You are getting very good at these shorts Kevin. 😆
ОтветитьLoop failed successful 😔
ОтветитьI hate shorts so much, can't even save these to a playlist
ОтветитьI love CSS
Ответитьwhat theme is he using? looks very nice
ОтветитьThe image/media is logically interpreted as a background, in which case it may be better to declare it before the content in the html code, so that the z-index + isolate can be omitted to take advantage of the normal flow of the document.
Ответить