Lädt...


🔧 CSS Loading Animation - 1


Nachrichtenbereich: 🔧 Programmierung
🔗 Quelle: dev.to

Hello everyone, in this tutorial, I'll show you how to use HTML and SASS to make a circular loading animation (You can compile the CSS from SASS in Codepen).

Let's get started...

What We are going to create?

HTML -

<div class="outer__circle">
  <div class="inner__circle__one">
    <div class="inner__circle__two">
     <div class="inner__circle__three"></div>
    </div>
  </div>
</div>
  • I have created 4 circle one inside the other.

CSS -

body{
  height:100vh;
  display:grid;
  place-items:center;
  background-color:rgb(0,0,0,1);
}

.outer__circle,
.inner__circle__one,
.inner__circle__two,
.inner__circle__three{
  display:grid;
  place-items:center;
  border-radius:50%;
}
  • Setting up the body's styling to position the loader in the middle; applying the grid and place-items properties to each of the four circles so that they are all centered inside the outer circle. border-radius to give them a circular appearance.
@mixin circle($width:100%,$height:100%,$borderDirection:border,$borderColor:black,$animationTime:1s){
   width:$width;
  height:$height;
  #{$borderDirection}:3px solid $borderColor;
   animation:rotation 2s linear infinite forwards;
}

// Animation mixin
@mixin animation($animationName){
  @keyframes #{$animationName}{
    @content
  }
}
  • Created a mixin with the circle's width, height, border side, and border color attributes. Every circle now has an animation due to the animation that was added to the mixin.
  • Another mixin named animation was created, and by using "@content," any animation for the keyframe can be defined.
  • The parameter animationName is another one it has.
.outer__circle{
  @include circle(80px,80px,border-top,crimson);
}
.inner__circle__one{
  @include circle(70px,70px,border-bottom,lime);
}
.inner__circle__two{
  @include circle(60px,60px,border-right,cyan);
}
.inner__circle__three{
  @include circle(50px,50px,border-left,violet);
}
  • Setting the styles for the circles by Including the mixin using "@include".
  • Each circle will have different styling using the parameters values passed.
@include animation(rotation){
  from{
    transform:rotate(0deg)
  }
  to{
    transform:rotate(360deg)
  }
}
  • Using the animation mixin to define our animation body, It will create an infinite rotation effect.

THANK YOU FOR CHECKING THIS POST
You can contact me on -
Instagram - https://www.instagram.com/supremacism__shubh/
LinkedIn - https://www.linkedin.com/in/shubham-tiwari-b7544b193/
Email - [email protected]

^^You can help me by some donation at the link below Thank you👇👇 ^^
☕ --> https://www.buymeacoffee.com/waaduheck <--

Also check these posts as well
https://dev.to/shubhamtiwari909/css-iswherehas-and-not-2afd

https://dev.to/shubhamtiwari909/theme-changer-with-html-and-css-only-4144

https://dev.to/shubhamtiwari909/swiperjs-3802

https://dev.to/shubhamtiwari909/going-deep-in-array-sort-js-2n90

...

🔧 Animation -17 : Staggered Stair Loading Animation


📈 38.34 Punkte
🔧 Programmierung

🔧 Animation -18 : Pure CSS Gooey Loader Animation


📈 34.32 Punkte
🔧 Programmierung

🔧 Animation -13 : Simple Content Preload CSS Animation


📈 34.32 Punkte
🔧 Programmierung

🔧 Animation -22 : Cube Flipping Loader CSS Animation


📈 34.32 Punkte
🔧 Programmierung

🔧 Animation -19 : Simple preloader CSS Animation


📈 34.32 Punkte
🔧 Programmierung

🔧 A cool loading animation in CSS pure


📈 33.38 Punkte
🔧 Programmierung

🔧 Interactive Loading Animation with CSS


📈 33.38 Punkte
🔧 Programmierung

🔧 I built these 5 types of loading animation in HTML and CSS, which do you prefer?


📈 33.38 Punkte
🔧 Programmierung

🔧 Amazing Loading Animation Using Html Css and Javascript.


📈 33.38 Punkte
🔧 Programmierung

🔧 30 Free CSS Loading Animation for your website in 2023


📈 33.38 Punkte
🔧 Programmierung

🔧 CSS Loading Animation - 1


📈 33.38 Punkte
🔧 Programmierung

🔧 Introduction of CSS, What is CSS, Why we use CSS and How CSS describe the HTML elements


📈 32.54 Punkte
🔧 Programmierung

🔧 Rendering( or How to Render) Animation in JSON format with LottieFiles animation in React application


📈 26.18 Punkte
🔧 Programmierung

🔧 Specify how multiple animation effects should composite with `animation-composition`


📈 26.18 Punkte
🔧 Programmierung

🐧 Pencil2D Animation - Opensource animation software


📈 26.18 Punkte
🐧 Linux Tipps

📰 How to enable the new page loading animation in Chrome


📈 25.24 Punkte
Web Tipps

📰 How to enable the new page loading animation in Chrome


📈 25.24 Punkte
🖥️ Betriebssysteme

📰 How to enable the new page loading animation in Chrome


📈 25.24 Punkte
🖥️ Betriebssysteme

🔧 How to Upload Files With Vanilla JavaScript and Add a Loading Animation


📈 25.24 Punkte
🔧 Programmierung

🔧 Loading animation with a ball


📈 25.24 Punkte
🔧 Programmierung

🪟 How to make Loading Animation in PowerPoint


📈 25.24 Punkte
🪟 Windows Tipps

🕵️ event-notifier Plugin up to 1.2.0 on WordPress Loading Animation cross site scripting


📈 25.24 Punkte
🕵️ Sicherheitslücken

🔧 Choosing the Right CSS Approach: Tailwind CSS vs Bootstrap vs Vanilla CSS


📈 24.41 Punkte
🔧 Programmierung

🔧 A BRIEF REVIEW OF CSS CASCADING, CSS SELECTORS and CSS SPECIFICITY.


📈 24.41 Punkte
🔧 Programmierung

🔧 Stylify CSS: Automagic CSS bundles splitting into CSS layers in Astro.build


📈 24.41 Punkte
🔧 Programmierung

🔧 CSS Grid: Moving From CSS Frameworks To CSS Grid (2018 and beyond)


📈 24.41 Punkte
🔧 Programmierung

🔧 Lazy loading vs Eager loading


📈 24.31 Punkte
🔧 Programmierung

🔧 Laravel Eager Loading – Loading Relationships Efficiently with Eloquent


📈 24.31 Punkte
🔧 Programmierung

🎥 From fast loading to instant loading


📈 24.31 Punkte
🎥 Video | Youtube

🕵️ Low CVE-2022-2169: Dwbooster Loading page with loading screen


📈 24.31 Punkte
🕵️ Sicherheitslücken

🔧 Animation : CSS Bouncy Loader 5 examples. ✨💡


📈 21.23 Punkte
🔧 Programmierung

🔧 Keyframe Animation css


📈 21.23 Punkte
🔧 Programmierung

🔧 How to create a slick CSS animation from Cocktail


📈 21.23 Punkte
🔧 Programmierung

matomo