Spinners, Loaders, and Junk - CSS Animations

Поділитися
Вставка
  • Опубліковано 27 січ 2025
  • Let's make a lot of weird spinners and junk, because the web needs more spinners!!
    Get the Code: codepen.io/devt...
    - -
    This video was sponsored by the DevTips Patron Community - / devtips
    Listen to Travis' Podcast - www.travandlos....
    Get awesomeness emailed to you every thursday - travisneilson.c...
    You should follow DevTips on Twitter - / devtipsshow

КОМЕНТАРІ • 450

  • @swiffty1
    @swiffty1 8 років тому +2

    I noticed the reason why spinner-2 was behaving bad was because you had the same properties for the CSS before and after pseudo-elements so when you applied the "bounce" animation in the &:before element on the same spinner-2 class and also the same "bounce" animation on the "&:before, &:after" the browser prioritized the animation properties defined inside the "&:before, &:after" for ".spinner-2" and the same animation was applied to both the "before" and "after" elements for ".spinner-2".
    I sorted out those two mad balls by separating the "&:before, &:after" elements applying all the properties found in the original chained "&:before, &:after" up until the "margin-left" property, these were inserted on top of the original single "&:after" properties.
    Then I applied the animations for the before and after individually, naming them differently and tweaking so the balls dont cross the bigger circles boundaries.
    Here is the fixed version, I forked it but made it clear Travis from Dev-Tips made the original: codepen.io/Flashpeed/pen/qNLBXV?editors=1100

    • @OfficialDevTips
      @OfficialDevTips  8 років тому +1

      Thanks for doing this. That makes a lot of sense. Upvote!

  • @uilifecteau4841
    @uilifecteau4841 8 років тому

    Thanks for these tips dude. They're really 'useful' is probably the best compliment I can give. Saying they're 'entertaining', 'engaging' or 'informative' (which they are) doesn't quite communicate the value they inherently offer. Than you.

    • @OfficialDevTips
      @OfficialDevTips  8 років тому

      I appreciate your encouragement my friend. Thanks for watching :)

  • @sam.kendrick
    @sam.kendrick 7 років тому +1

    Wow! I really appreciate your tutorials. I can safely say that you've opened up CSS for me! I used to fear and loathe it, but now it's something I enjoy doing. In fact, codepen has become a hobby for me. Thank you!

  • @phillhub
    @phillhub 8 років тому +9

    Travis, the guy getting a backend developer interrested in design :)

  • @maxwheeler935
    @maxwheeler935 8 років тому +27

    Challenge accepted! codepen.io/pentopaper/pen/vKvVEL
    1) Changed the openings in the ::before and ::after elements so there wouldn't be a gap in the back
    2) Adjusted chomp to have a difference of 50° each, for some reason 45° seemed to leave a tiny gap between the "jaw" when it closed
    3) Added a .cover to cover the dots Kurt has already eaten & reload them after each pass.
    4) The animation pauses a bit after it makes each pass.
    5) [EDIT] Also, forgot to mention that I solved the problem with it flipping by assigning Kurt a set width (height couldn't hurt either).

  • @WouterHamal
    @WouterHamal 8 років тому +1

    Wow that turkey radar thing got me :'). Awesome to see you having fun with this. Thanks for the videos, great as always.

  • @schmitch37
    @schmitch37 8 років тому

    These videos are awesome. I am really enjoying the lessons and the fact that you don't take them too seriously.

  • @optimusdebugger9638
    @optimusdebugger9638 7 років тому

    One thing I do like particularly is the way you are having fun doing this thing! Awesome! Keep it up!!

  • @chln9428
    @chln9428 3 роки тому

    I simply don't get how is it that this channel doesn't have like millions/billions of followers.. just check the like-dislike ratio, it's insane! Thanks for the content. I'm so glad I found your channel; 5 years later this is still so useful and relevant.

  • @Asdjke
    @Asdjke 8 років тому +64

    Dat boing doe

  • @jackn
    @jackn 6 років тому +2

    lmao i love this series. you're so entertaining. i watch these in my free time haha

  • @m081779
    @m081779 8 років тому

    Dude, you had me cracking up this morning, especially with the turkey radar. Awesome way to start my day!

    • @OfficialDevTips
      @OfficialDevTips  8 років тому

      Glad you had fun Marco, thanks for watching :)

  • @nChauhan91
    @nChauhan91 8 років тому +3

    Awesome video, i never realized making such cool animations could be this simple. Thanks 😊

  • @AutyMangaKa
    @AutyMangaKa 8 років тому +10

    You made me laugh and learn. Thanks Travis :)

  • @excitedbone4276
    @excitedbone4276 3 роки тому

    never thought i would have so much fun with CSS in my life ... what a time to be alive :) , thanls for the video :D

  • @HappyAnimals3D
    @HappyAnimals3D 6 років тому

    I really enjoy every video you do. You make learning complicated stuff much easier!

  • @TheMalni
    @TheMalni 8 років тому +12

    The atmosphere in this video is just a mood-raiser! I laughed loudly along, even my husband asked me what is so funny that I'm watching :D

    • @victornaut
      @victornaut 8 років тому

      Can you tell my why css in this video look so... weird?

    • @TheMalni
      @TheMalni 8 років тому +1

      +thronecode Because Travis is using Jade ;)

    • @TheMalni
      @TheMalni 8 років тому +1

      +thronecode and SASS, but you should really watch more videos on his channel, there you will find all the answers ;)

    • @victornaut
      @victornaut 8 років тому

      TheMalni Oh! Thank you so much Malni! Gonna add it to my list of things to learn :)

  • @JorgheAyala
    @JorgheAyala 7 років тому

    6:07 Its because if you rotate 360 deg you end up in the same point, that's why its not "animating"

  • @bryanoverbey
    @bryanoverbey 6 років тому +1

    at 5:30 use transition-direction: alternate to easily make it go forwards and backwards repeatedly

  • @guigrillo101
    @guigrillo101 8 років тому +48

    u are so happy. I love it
    Damnn this sound!!
    haha

    • @Tevmina
      @Tevmina 6 років тому

      gays are happy people!

  • @MrHumanwarrior
    @MrHumanwarrior 6 років тому

    Damn, I haven't been so much entertained, during a learning session, since never. Great job.

  • @ricefai
    @ricefai 8 років тому

    Thanks for the sudden scary sound at 4:41 LOL

  • @victornaut
    @victornaut 8 років тому +16

    4:25 - JUMP SCAPE OF THE YEAR

  • @bstnbstn
    @bstnbstn 8 років тому

    Dude, turkey radar made me laugh so much :)! Because of that funny moments it's much easier to learn and remember things. I'm glad to learn from your videos, your job is cool - HIGH five :)!

  • @davejs
    @davejs 8 років тому +4

    lol, the timer going off made this much more enjoyable to watch

    • @OfficialDevTips
      @OfficialDevTips  8 років тому

      haha, yea, that was a fun little thing. Stressful tho. It's like waiting to get slapped in the face. lol

    • @davejs
      @davejs 8 років тому

      You should have Los slap you when your time is up (reminiscent of the CSS Basics series).

    • @senorcactoni6979
      @senorcactoni6979 7 років тому

      hctaw ot elbayojne erom hcum siht edam ffo gniog remit eht, lol

  • @hemantparashar8781
    @hemantparashar8781 8 років тому

    This is called real passion. Loving n enjoying what you do and you're damn good at it. Thanks for the videos dude. Love em n you.

  • @JeremyBoulerice
    @JeremyBoulerice 7 років тому

    yoooo, I love this channel. That boing timer was funny

  • @augustuscolumbano
    @augustuscolumbano 7 років тому

    You are fun to watch! Learned a lot and can't wait to use them on my nexr project. Nice vid!

  • @karlrombauts4909
    @karlrombauts4909 8 років тому

    First video of yours I watched, I loved it, and immediately subscribed. Keep doing your thing, its awesome :)

  • @premier69
    @premier69 8 років тому +2

    Thank you travis! and it's so refreshing to see pug and sass as it should be written

  • @becreative7072
    @becreative7072 7 років тому

    thanks alot man your videos are awesome can't believe someone is sharing these kind of basics on youtube hatts off

  • @akaHyped
    @akaHyped 8 років тому +2

    Can't thank you enough for this absolutely invaluable resource :)

  • @LiamMartens
    @LiamMartens 8 років тому

    the reason is the fact that the transform property overrides so when you just set scale on the 50% the rotate gets lost

  • @YuukiRusGames
    @YuukiRusGames 8 років тому

    0 to 0% working as start and endpoints is very normal. Think of it this way, when you add 1 to 360 in most editors, it will become 1. In this way it actually reads 0 as the same as 360 in a lot of cases. If you have a start and endpoint that are both 0 or 360 or in this case 0 or 0, the animation will work the same as if you set 0 and 100.
    I don't know if I explained this clearly, but that's my mileage on this topic. I've had this happen a lot when working with rotations.

  • @noomla
    @noomla 8 років тому +1

    I can watch these videos all day. I feel like we are working on this together.

  • @princedube8332
    @princedube8332 8 років тому

    DUDE YOU'RE SO COOL WITH THIS STUFF... THANKS FOR SHOWING US

  • @DennisVlaanderen
    @DennisVlaanderen 8 років тому +3

    That timer made me jump from my seat, hahaha.

  • @lenaryan
    @lenaryan 7 років тому

    omg, the second spinner just made my day :D
    luv ya, Travis, you're motivating and super cool, and all the stuff you show is very useful and amazing ;)
    greetings from Russia!

  • @rickjancawaling6113
    @rickjancawaling6113 8 років тому

    another amazing video from trav! you are always awesome!

  • @83th3l
    @83th3l 8 років тому

    The boing! And the rapid lower lip chomp had me rolling.

  • @FirstPrincipleAlex
    @FirstPrincipleAlex 8 років тому +1

    I really need to read the docs of transform-origin. Every time you are using this property my mind simply explodes :D

    • @OfficialDevTips
      @OfficialDevTips  8 років тому

      Its like this: from where do we start this transformation? By default it's center center

    • @FirstPrincipleAlex
      @FirstPrincipleAlex 8 років тому

      DevTips Yea, it's pretty much like an Anchor Point in After Effects, but it still confuses me every time :D

    • @KaasFlipGames
      @KaasFlipGames 8 років тому

      +DevTips it's like an ancher point in photoshop, right? I mean the little thing in the center of each element when you press ctl + t

  • @menemelkatan7347
    @menemelkatan7347 8 років тому

    great effort and awesome animations
    thanks Travis :))

  • @praizerskater
    @praizerskater 7 років тому

    I had no idea that css was this powerful dang this is awesome!

  • @samwisegrangee
    @samwisegrangee 8 років тому +1

    I like how you said "This is raw, uncut" and then immediately there was a cut. ;)

  • @youWhattaFtube
    @youWhattaFtube 8 років тому +1

    I am a simple man. I see Travis i press like:)
    Greetings from Russia)

  • @crlsmtzprds
    @crlsmtzprds 8 років тому

    Travis you're awesome!
    You're THE Master of CSS my friend.. WOW !

  • @SmellySamosa
    @SmellySamosa 7 років тому

    21:33 I WANT WHATEVER THE HECK HE'S BEEN SMOKING!!!!

  • @aksharpatel2739
    @aksharpatel2739 8 років тому +1

    That surprised look with "Boing!" and to make it worse, the snort. :D

  • @richalgeni
    @richalgeni 8 років тому

    There is a fine line between genius and insanity!

  • @darkoefremovmkd
    @darkoefremovmkd 8 років тому

    You could've gone with rotate(45deg) and it would've been perfect, cause each individual border with color transparent is cutting off 1/4 of the circle, and since you're moving the bottom and the top part by half of the angle of that, 45deg is the answer, and you're gonna get much nicer animation.
    Anyway it was really exciting watching this, I could've never come up with something like that :D

  • @noone-gh1nr
    @noone-gh1nr 6 років тому

    Great video. I'm watching at work so it was extremely hard not to laugh. Thanks for the insights

  • @jonmayer
    @jonmayer 8 років тому

    Totally yay'd and yo'd, laughing the whole time. Insanity is infectious.

    • @OfficialDevTips
      @OfficialDevTips  8 років тому

      Hahah, thanks Jonathan :)

    • @jonmayer
      @jonmayer 8 років тому

      Thanks for the videos, they are entertaining and I've learned a bunch. I like that you don't always plan everything out, so we can see the thought process as well.

  • @rishisaran9114
    @rishisaran9114 7 років тому +1

    does anybody know how to activate the spinners while the page is loading and stop when it is loaded?

    • @ayepaiko
      @ayepaiko 7 років тому

      using conditional statement to render your spinner

  • @parthgarg9285
    @parthgarg9285 8 років тому

    working on the bouncy animation and then he's startled by the bounce alarm

  • @arturocoronel
    @arturocoronel 8 років тому +1

    Thanks for sharing this very enlightening and useful tutorial ...

  • @ELP1125
    @ELP1125 7 років тому

    His antics are hilarious 😂

  • @BuzzedAldrin1
    @BuzzedAldrin1 8 років тому

    Haha loved the BOINK jumpscare!

  • @singhravi488
    @singhravi488 7 років тому

    sir, how to use gradient in border color? i lose the border-radius when i try to do this.

  • @MsSohi
    @MsSohi 8 років тому +2

    hey Travis!
    have you seen the google Olympics web app ?
    obviously you knw how to create this fancy stuff (animations, behavior of pages when we move to another page ).. could you please tell us how to make it..??

  • @vince1271
    @vince1271 7 років тому

    23:34 JUMPSCARE, AHAHHAHAHA. Nice ringtone

  • @talha4142
    @talha4142 7 років тому

    tutorial was awesome can you provide the all property of animation and @keyframes? or another link of web that tells me properly how many types of animations and @keyframes property thanks.

  • @user-ui3og1bb8i
    @user-ui3og1bb8i 8 років тому

    It would have been easier to have do the pacman chomp like this:
    - have the bottom segment with a border-bottom-left & border-bottom-right. Likewise a top segment which would be border-top-right & border-top-left. That would then be two halves of a semi-circle
    - then you animate them from 45 degrees to 0 and probably -45 to 0

  • @Northerner19
    @Northerner19 8 років тому +6

    Your lessons very meaningful! Many thank from Russia :)

  • @worddoc4322
    @worddoc4322 8 років тому

    But how to set a loader, tracking progress and showing it with percents?

    • @OfficialDevTips
      @OfficialDevTips  8 років тому +1

      You have to get that info somehow from your loading api if you have one. Then connect that info to the "left: 0%" style.

    • @worddoc4322
      @worddoc4322 8 років тому

      +DevTips thanks!)

  • @mayaahmed
    @mayaahmed 8 років тому

    Awesome. Thanks. I fixed the code to work perfectly. Really enjoyed the tutorial.
    .track{
    width: 300px;
    height: 0px;
    border-top: 8px dotted #eee;
    display: inline-block;
    }
    .kurt{
    animation: moveChomp 5s linear infinite;
    width: 0px;
    height: 0px;
    position: relative;
    top: -15px;
    left: -15px;
    }
    .loader{
    background: none;
    display: inline-block;
    position: relative;
    }
    .loader:before, .loader:after{
    content: '';
    display: block;
    height: 0px;
    width: 0px;
    border: 30px solid orangered;
    border-radius: 50%;
    border-right-color: transparent;
    position: absolute;
    border-bottom-color: transparent;
    top: 50%;
    margin-top: -34px;
    animation: topchomp 1s ease-in-out infinite reverse;
    }
    .loader:after{
    // left: 80px;
    border-color: orangered;
    border-top-color: transparent;
    border-right-color: transparent;
    animation: bottomchomp 1s ease-in-out infinite;
    }
    @keyframes bottomchomp{
    0%, 100%{
    transform: rotate(10deg);}
    50%{
    transform: rotate(-50deg);}
    }
    @keyframes topchomp{
    0%, 100%{
    transform: rotate(-20deg);}
    50%{
    transform: rotate(37deg);}
    }
    @keyframes moveChomp{
    0%,100%{
    left: 0%;}
    50%{
    left: 100%;}
    0%{
    transform: rotateY(90deg);}
    3%, 47.5%{
    transform: rotateY(0deg);}
    52.5%, 98%{
    transform: rotateY(180deg);}
    100%{
    transform: rotateY(90deg);}
    }

  • @happydeux2254
    @happydeux2254 7 років тому

    @33:21didn't you say earlier you can't give inline elements dimensions?
    Thanks for all the content dude, I'm teaching myself HTML and CSS and your videos are excellent!

  • @crazypkrcrazy3115
    @crazypkrcrazy3115 8 років тому +1

    Never clicked on a video so fast lol. Can't wait to watch Travis!

  • @carlosb2288
    @carlosb2288 8 років тому

    Hola Travis, te sigo desde hace rato y he aprendido mucho de ti. Supongo que el código se entiende en todos los idiomas, Gracias.

  • @waltervarela3319
    @waltervarela3319 8 років тому

    Thanks Travis!

  • @worldofstrings
    @worldofstrings 8 років тому

    Cool Dev!!! do you have a book on these cool css animations?

  • @cedricyum9940
    @cedricyum9940 6 років тому

    why the second spinner has a dot as border

  • @captoc8346
    @captoc8346 8 років тому

    May i ask what the &:after, and &:before serves in a normal webpage? i have taken up web development and i have never come into a case where i need to use it, or at least that i have realized.

  • @codi0dio
    @codi0dio 8 років тому

    Shouldn't you be using the ::psuedo syntax instead of the single colon?

  • @saudqureshi3716
    @saudqureshi3716 6 років тому

    Travis when are u coming back ?

  • @horlacsd
    @horlacsd 8 років тому

    @42:40 make both the chomps
    @keyframes chomp
    0%, 100%
    transform: rotate(43deg)
    50%
    transform: rotate(-43deg)
    but delay one 0.5s w.r.t the other!

  • @97pixels
    @97pixels 8 років тому

    Hey Travis,
    Awesome video .. as expected! ;)

  • @dominichigh6727
    @dominichigh6727 8 років тому

    Travis, you are the man!
    However, in this particular video, I wasn't catching on? You were doing more showing than explaining what each css property would ultimately do,thus I had to guess what animation meant or how would it perform? Or "before" or "after" meant? And so on?

  • @bharakhal450
    @bharakhal450 8 років тому

    I am 10 and to be honest, my favourite channel is yours Travis.

  • @furiousgamer04
    @furiousgamer04 7 років тому

    Hey Dev, I have a query that you use different software for coding but I use notepad ++ and dreamweaver for coding and the code you use sometimes does not work on both the above mentioned software can you help me to how to make drop-down navigation bar with different effects you had showed in your video.

  • @vinzer72frie
    @vinzer72frie 7 років тому

    You spin me right 'round, baby, right 'round
    Like a record, baby, right 'round, 'round, 'round

  • @e.castro.5537
    @e.castro.5537 5 років тому

    Muchas gracias por brindar tu conocimiento. 👌 amazing contribution!.

  • @slackbraham
    @slackbraham 8 років тому

    This video was fascinating enough to motivate me to do 63% of codecademy's HTML & CSS course in one day xD and I'm still going. Awesome vid. And this is coming from a guy who's main focus should be python

  • @immyjackson
    @immyjackson 8 років тому

    have a tutorial about before and after ????

  • @kellycallum972
    @kellycallum972 7 років тому

    You're fun...ny! Enjoyed your tutorial. Conceivably I should be able to make a loader/spinny thing that looks like a glass of water filling up (can this be a gif?) and code it with css into my html? Or do I need to use something else? I'm struggling with this at the moment...this can be done right?

  • @powerusr
    @powerusr 8 років тому

    is he using atom? how does he make that split view.

  • @Bazkur98
    @Bazkur98 8 років тому

    Great as always

  • @sandipsaha4469
    @sandipsaha4469 7 років тому

    How to put that in web page? l mean when page load it will show

  • @mirkorenerLT
    @mirkorenerLT 8 років тому

    Hahaha that boing was hilarious 😂

  • @fuse98
    @fuse98 7 років тому

    LOL, keep the timers! It's a Keyframe on it's own!

  • @ArnoldsKtm
    @ArnoldsKtm 8 років тому

    Another challenge: make the dots behind disappear. I would say that behind the pacman there is a bar with the background color that blocks everything behind it.

  • @michajankowski3615
    @michajankowski3615 6 років тому

    Cool as always. Thanks!

  • @MrJack-yx6nm
    @MrJack-yx6nm 8 років тому

    Hey great video Travis! But I'd like to see a video on how to make an image preloading animation that disappears when the image is loaded. Could you do that? Or just tell me real quick how it's done :)

    • @OfficialDevTips
      @OfficialDevTips  8 років тому

      That's all done in JS. So the way it works is you place the animation and then tell JS to load new content in when it's ready. It rill replace the spinner.

    • @MrJack-yx6nm
      @MrJack-yx6nm 8 років тому

      +DevTips Thank you for your help :)

  • @tavinturner4790
    @tavinturner4790 8 років тому

    You had almost too much fun Travis. Almost.

  • @martinnov8k
    @martinnov8k 8 років тому

    I am watching this at work and having LOL moment on that super fast chapm champ champ (44:19) :D that was so funny :D

    • @OfficialDevTips
      @OfficialDevTips  8 років тому

      HAHAHA, chomchomchomchomcmcmcmcmc. That killed me!

  • @kevvu_l
    @kevvu_l 8 років тому

    I am wondering how can i make my animation go 50% when i hover and then fallback to 0% slowly when i leave the hover. Right now it just teleports to its initial state. It's not that simple as just ease-in , ease-out right?

    • @OfficialDevTips
      @OfficialDevTips  8 років тому

      Use two transitions, on on the hover state and one not. Make them different. Play with it till it makes sense to you.

    • @kevvu_l
      @kevvu_l 8 років тому

      Oh i actually got it to work :D Thanks!
      It kinda feels funky tho because if the mouse is taken off midway animation it would cut to the end of the animation and start to fallback at that point.
      I think i would need to gather the % rotation that it is on and from there go back to 0%.
      I am making this way more complicated than needed i guess.

  • @leoneljuarez49
    @leoneljuarez49 8 років тому

    I love your videos, and your personality. I would definitely be your friends in real life if you weren't weirded out by that comment lol.
    keep up the awesome work.

  • @sandervspl
    @sandervspl 8 років тому

    I'm completely lost on how you managed to "cut" out a triangle in that circle for the pacman face. What's happening there?

    • @OfficialDevTips
      @OfficialDevTips  8 років тому

      The circle was a 0px 0px element with s 30px border. I rounded the border, then removed the border-right- creating the gap

  • @debasishpatra6749
    @debasishpatra6749 8 років тому

    for sharing your knowledge with us

  • @TyreeArt
    @TyreeArt 8 років тому

    LOLOLOL! You crack me up! :-D
    I wish you did all the tutorial videos I watch. I actually stay awake watching your vids. :-D

    • @OfficialDevTips
      @OfficialDevTips  8 років тому

      I'm so happy to hear that you like them Matt!!

  • @yashumittal
    @yashumittal 7 років тому

    From where can I get that ringtone :P