Тёмный

How to make shapes with CSS 

Kevin Powell
Подписаться 941 тыс.
Просмотров 350 тыс.
50% 1

Опубликовано:

 

21 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 346   
@Mwtorres89
@Mwtorres89 2 года назад
This video is GOLD. Thank you, Kevin. We need these types of simplified videos more often.
@timkimdesign
@timkimdesign 4 года назад
display: grid; place-items: center; Ahhhhhhh, simple and easy. Thank you.
@anad6448
@anad6448 5 лет назад
You're such a great communicator! Thanks for breaking things down so nicely!
@ReligionAndMaterialismDebunked
You're* Yee ^_^
@fuseteam
@fuseteam 4 года назад
"if you find this 6 months from now" me coming 2 years later: i wonder how good it is now
@achalsankat7898
@achalsankat7898 4 года назад
Lol, I just thought the same buddy! XD
@robertjustineduardo3395
@robertjustineduardo3395 4 года назад
so.. is it? XD
@fuseteam
@fuseteam 4 года назад
@@robertjustineduardo3395 appears pretty solid if we drop IE like a rock xD
@naveenvenkateshk
@naveenvenkateshk 3 года назад
me seeing this for the first time 3 years after the video was posted.
@HorizonHuntxr
@HorizonHuntxr 3 года назад
@@naveenvenkateshk same, I'm pretty sure browser support is now very good
@WingedDestinyX
@WingedDestinyX 5 лет назад
I am an iOS dev and I just started getting into building websites again (love to do front-end work). Your videos are gold! Thanks a lot :D
@trungbuichi7864
@trungbuichi7864 4 года назад
I was desparate of trying to create different shapes by border combine with transparent and then I found this. What a badass vid! Thanks a bunch!!
@teppichkuchen8606
@teppichkuchen8606 6 лет назад
Hello Kevin, thanks for that input! :) I have one hint for you: you can also centering things with "top: 50%; transform: translateY(-50%);". Its very useful and crossbrowser compatible. Keep up the good work!
@KevinPowell
@KevinPowell 6 лет назад
For sure, I use that a lot! I do like that we don't have to with flex and grid, but as you mentioned, that has better browser support :)
@dustinpoissant
@dustinpoissant 6 лет назад
If im centering text in a fixed height container just use line-height: 100px and text-align: center
@williampelletiervslol1949
@williampelletiervslol1949 6 лет назад
is .one a div? cause now im rlly confuse about the emojji and the fack tht you wrote place-item: center; and the circle goes right in the middle of the emojji
@williampelletiervslol1949
@williampelletiervslol1949 6 лет назад
nvm tried something and it work
@williampelletiervslol1949
@williampelletiervslol1949 6 лет назад
emojji is just a h1/6 lol
@brandon5058
@brandon5058 3 года назад
you're literally the css god i have been looking for! my css skills have gone through the roof since I am doing the cssbattles with your videos. *THANKYOU!*
@nathanb5241
@nathanb5241 3 года назад
Oh my god. Place-items? are you kidding me? how have I not seen that. There's gold information for css learners from beginning to end here. Ty. Subbed.
@01RobPwr
@01RobPwr 6 лет назад
Ha I was just thinking the other day “how the hell do I do different shapes” and was going to have a look this weekend and what pops up, your video! Perfect 🙂
@KevinPowell
@KevinPowell 6 лет назад
Hah, that's awesome, glad my timing was so good Rob!
@typingmasterpro6762
@typingmasterpro6762 3 года назад
I have seen your lot of videos and this one is helped me a lot than others. Nice little work you have put in this video. Thanks, mate.
@fpgroups
@fpgroups 3 года назад
It is like a magician revealing tricks of the trade! Nice work.
@abdessadekelaasri8862
@abdessadekelaasri8862 2 года назад
The best Teacher ever!! I have seen a lot of your videos and I don't think anyone loves CSS more than you do : )
@MarkOhanesian
@MarkOhanesian 4 года назад
Kevin, this is one of the best CSS tutorials I've ever watched! Thank you so much.
@BasicMike
@BasicMike 2 года назад
A really fantastic explaination of how to make shapes with CSS. I hope you'll produce a more extensive explaination on what you can do with clip-path and the difference between clip-path and clip-rule.
@ricardopassos1180
@ricardopassos1180 4 года назад
I could feel what you felt when you used the calc function and everything worked as expected. In addition, your "strategy" in your last example gave me some insights on how to use the calc() function.
@Harpagophytum67
@Harpagophytum67 4 года назад
Thank you for your response on the other video. On this one speak to you much more calmly. Keep going, you're doing a good job.
@jnoah7537
@jnoah7537 6 лет назад
I was looking all over for this type of CSS Tut! You sir are the best!!!! 👍🏽 Thanks a lot for the knowledge. I'm going to be trying this out to expand my css arsenal
@recursionError344
@recursionError344 6 лет назад
Looked everywhere for a good explanation of polygon coordinates! Thank you :D
@KevinPowell
@KevinPowell 6 лет назад
Glad that this helped you out!
@Melvin420x12
@Melvin420x12 6 лет назад
Thanks for the video, loved it! It's so sad that we won't learn these kinds of things in the study I'm doing. ( Graphics Design ). It's all so incredibly basic stuff that you could learn in less than a month but spread in 3 years. Thanks to people like you I can step up my game without depending on my study and learn more than the basic properties!
@KevinPowell
@KevinPowell 6 лет назад
Really glad that I've been able to help Melvin! In Graphic Design, how much of what you're studying is dealing with the web specifically?
@adanedhelbg
@adanedhelbg 6 лет назад
Just binged a few videos of yours - awesome work, man. Can't wait to see more from you :)
@KevinPowell
@KevinPowell 6 лет назад
So glad you're enjoying my content Kaloyan!
@blackpurple9163
@blackpurple9163 Год назад
Please continue this series, doesn't matter if it's 5 minutes or 10 or 15, your choice, but bring these back
@marvinschulze6152
@marvinschulze6152 6 лет назад
great video men! I haven't seen any video about css as good in the last month
@christinejurewicz3057
@christinejurewicz3057 6 лет назад
Just what I needed for something I ran into recently. Thank you!
@KevinPowell
@KevinPowell 6 лет назад
Awesome, glad the timing was good Christine!
@XexusNH
@XexusNH 2 года назад
First time using code pen, that's a nice site. I added in a slow infinite animation and a transform rotate (100deg 80deg) to make the smile move back and forth. Silly, but fun :) I've been watching your videos for a few weeks now, makes me interested in web design again.
@chandrakant6283
@chandrakant6283 2 года назад
Absolutely amazing information. I find clip-path fascinating to use in my design, it's just the browser support that keeps me from abusing it to form complex shapes.
@captainzappa8561
@captainzappa8561 4 года назад
I know you know this but. Love your videos learning a lot thanks for the info #main{ position:absolute; left:10%; top:10%; width:40%; height:80%; background-color:orange; background-image:linear-gradient(45deg,black 50%, transparent 0), linear-gradient(-45deg,transparent 50%, rgb(60,60,60) 0); background-size:100% 100%, 100% 100%; background-position:50%,50%; }
@airlobster2
@airlobster2 5 лет назад
clip-path is awesome! I also discovered another cool thing: I needed to created a down-arrow shape which also needs to stretch vertically. obviously I used an arrow shape polygon. however, the arrow's triangle part looks horrible when stretched. So....here is what I've done: clip-path: polygon( 20% 0%, 80% 0%, 80% calc(100% - 15px), 100% calc(100% - 15px), 50% 100%, 0% calc(100% - 15px), 20% calc(100% - 15px) ); works like a charm!
@malangope
@malangope 5 лет назад
Regarding the angle shape between the sections at the end, if you want IE support you could use borders instead. Something like this: .wedge { background: #5B5F97; border-width:0 0 10vw 100vw; border-style:solid; border-color:transparent #FF6B6C #FF6B6C transparent; }
@Glow0110
@Glow0110 5 лет назад
so many useful gems in this video
@geralt9036
@geralt9036 5 лет назад
11:14 thank you for that! That's all I needed for this video Thanks! You're the only dev that's helping me to get to know around
@pradipktimsina8695
@pradipktimsina8695 4 года назад
you are such a genius... love your work...
@lloyd7miller
@lloyd7miller 6 лет назад
click-path: polygon with calc and vw is sickkk 👌
@KevinPowell
@KevinPowell 6 лет назад
Yeah, calc has so many awesome possibilities. Always fun finding cool stuff like this.
@akashbond862
@akashbond862 4 года назад
I love your method of explaining things, thanks!!!
@lizalizaveta1882
@lizalizaveta1882 3 года назад
Wow, now I know how they do it, gonna try . Thank you!
@AntonSlavik
@AntonSlavik 6 лет назад
Awesome! I'm crap and making things look nice (in the 2010s) and I design my own business website once every year or so, which always looks.... boxy. This helps a lot.
@Fabian-_-
@Fabian-_- 6 лет назад
Exactly what I searched for long! Thank you so much :D
@incinerator7146
@incinerator7146 5 лет назад
just the perfect video i've been looking for ! your channel's amazing
@evergreen7781
@evergreen7781 3 года назад
That's awesome ♥️♥️♥️ Can you please make a video on making wavy templates using CSS3 & a detail about transform, z-index,skew & all...
@swatichoudhary1008
@swatichoudhary1008 Год назад
You videos are really worthy.Learnt so much and still learning.Thank you
@jamesrosemary2932
@jamesrosemary2932 5 лет назад
The use of calc() was clever ;)
@southgecko3653
@southgecko3653 5 лет назад
Thank you for this video. This has been incredibly helpful
@RussDnB
@RussDnB 4 года назад
Very cool tips. Thank you Kevin :)
@nellywasti3290
@nellywasti3290 2 года назад
Thank you so much for your way of teaching i really enjoy it .. Thank you
@martalost
@martalost 5 лет назад
Great video, your voice sees to be created to make educational videos, so good! I already used your tips this on my website and I love the effects. Thanks!
@ben-cb5er
@ben-cb5er 3 года назад
When it comes to anything related to css you are god lol 🙌 thank you! Great video and please do more on grid layouts 🙏
@siarotleahmae8180
@siarotleahmae8180 3 года назад
This is so great for a beginner like me Kevin.
@anishadhikari3690
@anishadhikari3690 4 года назад
This channel is GEM. Thank you so much :) :)
@fuad7258
@fuad7258 3 года назад
Thank u so much for this video, love from Bangladesh 😍. Subscribe done!
@adamwright8050
@adamwright8050 5 лет назад
Thanks a lot :) I’ve been trying to find a simple way to get the exact angle you are using on the background clip path in the first section so I can slide a logo coming from behind it and then back behind it on scroll. Thanks a lot dude nice vid! 👍👍👍👍
@mosescodes3677
@mosescodes3677 4 года назад
Thank you kevin! we love your contents please keep up with good work
@SamuelRamirezTijuana
@SamuelRamirezTijuana 5 лет назад
I like You and I love what you do... so I'm becoming a Patron of yours. Hope more people show their admiration to your work and gratitude for you knowledge sharing by being patrons also. Keep it up Kevin.
@KevinPowell
@KevinPowell 5 лет назад
Thanks so much Samuel! Very appreciated!
@AlexGeekly
@AlexGeekly 3 года назад
Really like this one! Thanks 😀
@andrewt248
@andrewt248 6 лет назад
I didn’t really look to see if this has been suggested yet, but you could do your normal layout and then wrap your clip-path-specific styles (including things like the negative margin) in an @supports (clip-path: polygon(0 0)) { block }.
@KevinPowell
@KevinPowell 6 лет назад
Oh I like that :)
@Konstantah888
@Konstantah888 5 лет назад
Very useful video, thanks a lot! Gonna try it out on my projects.
@nathancornwell1455
@nathancornwell1455 4 года назад
Firefox has a really awesome feature in their dev tools like their grid dev tools , where you can click on a clip-path icon and shows you all the points in your clip path and you can drag the points around to see different shapes ...
@nathancornwell1455
@nathancornwell1455 4 года назад
Also, you can actually double click anywhere on the perimeter of your shape and add in new points to alter the shape .
@vonshitz
@vonshitz 3 года назад
Hi Kevin, first of all thanks for all your great content. I'm learning so much from you! I recently found a video where i found a different way to make shapes using a chrome extension called shapes where you can manipulate images and copy paste the paramaters into your code. this works very nice with shape-outside and then pasting in the polygon paramaters.
@terrap0b_ps995
@terrap0b_ps995 2 года назад
Kevin is my go to guy for CSS always!
@raphaelandrade555
@raphaelandrade555 2 года назад
Thank you, man! Helped a lot, i owe you a coffee
@nevildst
@nevildst 6 лет назад
Awesome work, Kevin. Thanks for everything :)
@fhkodama
@fhkodama 2 года назад
Kevin, you are awesome! Congratulations on your incredible work and to being such a nice guy! :)
@thewisecoder4128
@thewisecoder4128 3 года назад
Great work! You got my subscribe!
@hossam_okasha
@hossam_okasha 4 года назад
I was lucky to find this channel!! thank you, Kevin.
@KevinPowell
@KevinPowell 4 года назад
Glad you enjoy it!
@kumarshantanu3084
@kumarshantanu3084 3 года назад
KEVIN on the rescue just like always. :)
@ShadiMuhammad
@ShadiMuhammad 6 лет назад
Thanks a lot Kevin, I like your tutorials too much. keep going. 👌
@KevinPowell
@KevinPowell 6 лет назад
So glad to hear that!
@AshishKumar-ed1ru
@AshishKumar-ed1ru 6 лет назад
Awesome man, you are my mentor you show so much efforts towards teaching has those topics that are faded away in process of learning web development and design. Thanks a ton !!
@KevinPowell
@KevinPowell 6 лет назад
No problem at all, super glad to have been able to help 😁
@miscany
@miscany 2 года назад
I learned so much in so little time, and I was not bored. I love your voice man (no homo of course).
@Osedread
@Osedread 6 лет назад
A couple of days ago I was googling how to do this and some info about Adobe Xd, and you randomly appeared on my youtube feed. Amazing work, keep it up!
@KevinPowell
@KevinPowell 6 лет назад
Thanks a lot. Google is spooky like that sometimes, lol.
@nicdemus-rc7gc
@nicdemus-rc7gc 5 лет назад
Not random,...google literally listens to you through your computer....google it, it's true...
@ahmmadawshaf
@ahmmadawshaf 4 года назад
Awesome content! keep it up!
@narayanarao4bsnl
@narayanarao4bsnl 4 года назад
Learned something new..... Thank You...!
@moizkhalid2714
@moizkhalid2714 5 лет назад
wow. Your Videos Are So Informative. Love your Videos.
@Devronization
@Devronization 5 лет назад
Fantastic video. Thanks a lot.
@vishavaroraYT
@vishavaroraYT 6 лет назад
do more videos on css tricks etc... i really enjoyed it.. subbed
@KevinPowell
@KevinPowell 6 лет назад
Glad you liked it The Great Cheater, thanks for subbing :D
@williampelletiervslol1949
@williampelletiervslol1949 6 лет назад
me too
@spaceghost7807
@spaceghost7807 2 года назад
Thanks man! I needed this!
@syberiaok
@syberiaok 4 года назад
Super cool and well explained! Thanks!!
@thefaredevil
@thefaredevil 5 лет назад
Brilliant video! Very informative and to the point
@grantphix
@grantphix 2 года назад
Thanks for these wonderful videos.
@GulfJobSeeker_Vacancies
@GulfJobSeeker_Vacancies 2 года назад
You are a very good teacher. In video you said why do they keep hyper link underline by default. They did that to differentiate between text and hyperlinks or else it will be difficult to differntiate.
@lambo-ca
@lambo-ca 4 года назад
Thanks for the last one.
@chamnil8666
@chamnil8666 3 года назад
cool stuff.Thank you sir.
@Alessandro-nq3tm
@Alessandro-nq3tm 5 лет назад
I've just discovered your channel thank you for your work is amazing
@markystudio14
@markystudio14 3 года назад
This what I am looking for 🤩😍😍
@atwarwithlife
@atwarwithlife 2 года назад
such a lifesaver. thank you!
@jacquesduplessis6175
@jacquesduplessis6175 5 лет назад
Nice video, thanks!
@mohitverma7372
@mohitverma7372 5 лет назад
the triangle which u made in section one u can do it with the help of border : top , left , bottom and right. that was easy to make.
@KevinPowell
@KevinPowell 5 лет назад
I have another video which looks at that (and in that one, some says to do it this way in the comments 😂). Both are good :)
@mohitverma7372
@mohitverma7372 5 лет назад
@@KevinPowell Nice to see that u work for people who following you . keep growing brother
@tristanforward9094
@tristanforward9094 6 лет назад
Thanks Kevin your note about content: ""; is super helpful!
@agamdeepsingh001
@agamdeepsingh001 3 года назад
Nice video sir, it helped me a lot. Thanks 👍👍
@onihonker
@onihonker 6 лет назад
Thank you for this video. I learned something new and it was easy to understand.
@unfairracing8113
@unfairracing8113 5 лет назад
awesome tutorial as always, thank you
@44turtlepower
@44turtlepower 2 года назад
Thanks, Kevin! Very cool, and very helpful.
@dimtodim
@dimtodim 5 лет назад
great job man :) very helpful
@Concept2035
@Concept2035 3 года назад
but the thing is although I have a slanted rectangle, it still takes up space like a square. I have this slanted rectangle next to each other for a design and I can't fit them side by side exactly because they still take up space like a square.
@tr7343
@tr7343 4 года назад
Well Done. thanks man.😻😻
@ARTICFR0ST
@ARTICFR0ST 5 лет назад
Thanks for this, was looking around for it.
@binodrd5943
@binodrd5943 5 лет назад
Thank you for sharing useful CSS Tricks. But how to put border outside shape? I tried many times but I couldn't do. Please also make some video about Polygon Border. Thank you!
@KevinPowell
@KevinPowell 5 лет назад
It won't really work... You'd probably want to go with an SVG if you need a border on it.
@silenux7419
@silenux7419 5 лет назад
You can't do that normally. But there are ways to achieve it. stackoverflow.com/questions/31854185/how-to-add-border-in-my-clip-path-polygon-css-style
@josevalente1667
@josevalente1667 5 лет назад
Very very good! I have learned a lot!
@sr.alex1434
@sr.alex1434 6 лет назад
dont understand english but i should whit this code!! Googling so much time for this!! Thanks bro!!!greatings from Panama!!
@KevinPowell
@KevinPowell 6 лет назад
No problem, glad you were able to get through it despite the langauge!
@GanpatKakar
@GanpatKakar 6 лет назад
Thank you so much for sharing knowledge, i really like this, but i am not getting who the hell is these people who don't like these cool designs (people gave dislike to this cool thing). Anyways i really thankful to you for this this video
@KevinPowell
@KevinPowell 6 лет назад
Thanks so much for the kind words :)
@thejword
@thejword 4 года назад
Thanks! It works BUT when I add the negative margin it takes away the slant and just becomes straight at the bottom again... maybe its because this divs are absolute positioned...
@betheprogrammer5359
@betheprogrammer5359 5 лет назад
thanks kevin for unique shapes
Далее
Using CSS Position Absolute: some practical examples
26:18
А вам, слабо?
00:22
Просмотров 55 тыс.
LIFEHACK😳 Rate our backpacks 1-10 😜🔥🎒
00:13
CSS Tips And Tricks I Wish I Knew Before
12:12
Просмотров 478 тыс.
Awesome UI Interactions with the CSS Clip Path Property
16:15
Using CSS custom properties like this is a waste
16:12
Просмотров 171 тыс.
Creating unique shapes & animations using CSS clip-path
10:58
Top 10 CSS One Liners That Will Blow Your Mind
13:34
Просмотров 957 тыс.
How to Do 90% of What Plugins Do (With Just Vim)
1:14:03
Просмотров 895 тыс.
Can you beat me at a CSS Battle?
49:42
Просмотров 358 тыс.
А вам, слабо?
00:22
Просмотров 55 тыс.