Background image with CSS flex | Beginner tutorial

Опубликовано: 21 Июнь 2021
на канале: Red Eye Media
4,240
29

How to create a responsive background-image and title with CSS flex box and start to master its fundamentals.

This is something I was struggling with in the beginning. And you encounter it more often than you would think. It's a handy trick to have in your toolbox and whip out when needed.
Making basically any kind of page meant for the internet - OK, here we go again.

CSS flex is a super useful part of CSS to position the parts of your page. It might sting for a second when touching it for the first time, but it's well worth understanding it for sure.

This is the CSS that will get you a long way for not that much effort.
Learning how to position things is essential styling knowledge and you'll encounter it sooner or later in your front-end work, I guarantee it.

Note that this is a React project, so to run it you need to open a terminal pointing to your projects directory and type:
npm run start

This will start the development server on port 3000 and it usually opens automatically.

Complete code on Github:
https://github.com/Polkagris/css_flex...

How to get the code without using the terminal:
1. Go to the Github link
2. Click on the green Code-button
3. Click Download ZIP
4. Extract and open the folder in your proffered code editor (I'm using visual studio code)
5. To see the game in action, just open the index.html file in you browser

Code editor download link:
https://code.visualstudio.com/

Timecodes
0:00​ - Intro
0:48​ - Start of coding
1:19 - Styling
1:40​ - Attaching the background-image
2:48​ - Style title text
4:30​ - Make it responsive
5:44​ - Code complete

Twitter:   / redeyemedia3  
RedEyeMedia website: https://redeyemedia.io/


На этой странице сайта вы можете посмотреть видео онлайн Background image with CSS flex | Beginner tutorial длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Red Eye Media 21 Июнь 2021, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 4,240 раз и оно понравилось 29 зрителям. Приятного просмотра!