css animation examples
CSS
animation: name duration timing-function delay iteration-count
direction fill-mode play-state;@-webkit-keyframes pulse {
0% {
background-color: red;
opacity: 1.0;
-webkit-transform: scale(1.0) rotate(0deg);
}
33% {
background-color: blue;
opacity: 0.75;
-webkit-transform: scale(1.1) rotate(-5deg);
}
67% {
background-color: green;
opacity: 0.5;
-webkit-transform: scale(1.1) rotate(5deg);
}
100% {
background-color: red;
opacity: 1.0;
-webkit-transform: scale(1.0) rotate(0deg);
}
}
.pulsedbox {
-webkit-animation-name: pulse;
-webkit-animation-duration: 4s;
-webkit-animation-direction: alternate;
-webkit-animation-timing-function: ease-in-out;
}
<style>
#ball {
width: 100px;
height: 100px;
margin: 50px auto;
position: relative;
border-radius: 50%;
background: linear-gradient(
35deg,
#ccffff,
#ffcccc
);
/*"Call" the animation "function" */
animation-name: bounce;
animation-duration: 1s;
animation-iteration-count: infinite;
animation-delay: 2s;
/* Normal, reverse, alternate(between the fwd and back)
and alternate-reverse */
animation-direction: reverse;
/* Ease is deafault, use cubic-bezier(n,n,n,n) for custom */
animation-timing-function: linear;
/* if you want something to display from hidden
set the opacity to 0 and in the keyframe steps bring
the opacity to 1 gradually to stop it flashing */
}
/* The animation "bounce" */
@keyframes bounce{
/* start */
0% {
top: 0px;
}
/* step (you can add multiple incremental steps from 1-100) */
50% {
top: 249px;
width: 130px;
height: 90px;
}
/* end (you can count down from 100 to 0 too) */
100% {
top: 0px;
}
}
</style>
<div id="ball"></div>One of the best out there, see link below/* Answer to: "css animation examples" */
/* HTML:
<body>
<div></div>
</body>
*/
div {
width: 100px;
height: 100px;
border-radius: 15px;
background-color: red;
position: relative;
animation-name: example;
animation-duration: 5s;
animation-timing-function: ease-in-out;
animation-direction: alternate;
animation-iteration-count: infinite;
}
@keyframes example {
0% {background-color:red; left:0px; top:0px;}
25% {background-color:yellow; left:200px; top:0px;}
50% {background-color:blue; left:200px; top:200px;}
75% {background-color:green; left:0px; top:200px;}
100% {background-color:red; left:0px; top:0px;}
}
Also in CSS:
- Title
- vertical multi color border css
- Category
- CSS
- Title
- css set property with data attribute
- Category
- CSS
- Title
- how to call an id in css
- Category
- CSS
- Title
- pure css heart
- Category
- CSS
- Title
- print zend db select query to string
- Category
- CSS
- Title
- stop text from wrapping
- Category
- CSS
- Title
- ordered list indent
- Category
- CSS
- Title
- css make input unselectable
- Category
- CSS
- Title
- line spacing css
- Category
- CSS
- Title
- how to use a blank space with grid template areas css
- Category
- CSS
- Title
- div scrollbar style
- Category
- CSS
- Title
- difference between :after and ::after
- Category
- CSS
- Title
- css text strike
- Category
- CSS
- Title
- Node.js: printing to console without a trailing newline
- Category
- CSS
- Title
- css to scss
- Category
- CSS
- Title
- How do you change the font colour in CSS?
- Category
- CSS
- Title
- how to align an image left in css
- Category
- CSS
- Title
- a no line css
- Category
- CSS
- Title
- css comment tag
- Category
- CSS
- Title
- ggo
- Category
- CSS
- Title
- css overwriting styles
- Category
- CSS
- Title
- remove border select css
- Category
- CSS
- Title
- how to add background in css
- Category
- CSS
- Title
- how to change jumbotron size
- Category
- CSS
- Title
- how to link css to html
- Category
- CSS
- Title
- all cursor types
- Category
- CSS
- Title
- how to use sass
- Category
- CSS
- Title
- kerning css
- Category
- CSS
- Title
- css center element on screen
- Category
- CSS
- Title
- css feather border
- Category
- CSS
- Title
- box shadow css
- Category
- CSS
- Title
- jquery css add important
- Category
- CSS
- Title
- css backdrop filter blut
- Category
- CSS
- Title
- css button style rectangle
- Category
- CSS
- Title
- hide scrollbar css
- Category
- CSS
- Title
- adding shadow to a div
- Category
- CSS
- Title
- cdnjs font awesome
- Category
- CSS
- Title
- prevent text from wrapping in css
- Category
- CSS
- Title
- comfirm before delete
- Category
- CSS
- Title
- docker exec bash
- Category
- CSS
- Title
- responsive images css
- Category
- CSS
- Title
- text shadow css generator
- Category
- CSS
- Title
- how long since 1993
- Category
- CSS
- Title
- how to make text wrap on overfloe with css
- Category
- CSS
- Title
- hover transition css
- Category
- CSS
- Title
- static css is not fetching style in django
- Category
- CSS
- Title
- css style scrollbar
- Category
- CSS
- Title
- how to change the size of something on hover in css
- Category
- CSS
- Title
- css :focus
- Category
- CSS
- Title
- clear both css
- Category
- CSS
- Title
- css smooth text shadow
- Category
- CSS
- Title
- tailwind css
- Category
- CSS
- Title
- js ransform css
- Category
- CSS
- Title
- sass mixin breakpoint
- Category
- CSS
- Title
- how to space out buttons css
- Category
- CSS
- Title
- css overflow-y scroll
- Category
- CSS
- Title
- css limit text length
- Category
- CSS
- Title
- E/ViewRootImpl: sendUserActionEvent() mView returned.
- Category
- CSS
- Title
- how to use direct child for ol in css
- Category
- CSS
- Title
- react import css
- Category
- CSS
- Title
- background-image: image css
- Category
- CSS
- Title
- hwo to use flexbox to make a nav bar
- Category
- CSS
- Title
- css image effects
- Category
- CSS
- Title
- remove style from link
- Category
- CSS
- Title
- pourquoi mon css ne fonctionne pas quand je recharge la page
- Category
- CSS
- Title
- changong text color css
- Category
- CSS
- Title
- font awesome css link
- Category
- CSS
- Title
- css hide mark border
- Category
- CSS
- Title
- media query
- Category
- CSS
- Title
- css blur background
- Category
- CSS
- Title
- css font families
- Category
- CSS
- Title
- how rotate infinity css
- Category
- CSS
- Title
- how to add background image in a container css
- Category
- CSS
- Title
- how to link your css file to html
- Category
- CSS
- Title
- css js show or hide on click
- Category
- CSS
- Title
- flow direction in css
- Category
- CSS
- Title
- random color generator css,javascript,html
- Category
- CSS
- Title
- move table css
- Category
- CSS
- Title
- enter in css
- Category
- CSS
- Title
- update npm
- Category
- CSS
- Title
- link to css
- Category
- CSS
- Title
- css change class name start with
- Category
- CSS
- Title
- responsive font sizing css
- Category
- CSS
- Title
- move bullets in css
- Category
- CSS
- Title
- html css position
- Category
- CSS
- Title
- html display text in alternating coloured panels
- Category
- CSS
- Title
- comment css
- Category
- CSS
- Title
- css keep background image from scrolling
- Category
- CSS
- Title
- ms-clear event
- Category
- CSS
- Title
- css keep image aspect ratio
- Category
- CSS
- Title
- how to change the height of an image in css
- Category
- CSS
- Title
- css how to center images in a table cell
- Category
- CSS
- Title
- vertical align h1 inside div
- Category
- CSS
- Title
- css no overflow
- Category
- CSS
- Title
- center div css flex
- Category
- CSS
- Title
- css animation examples
- Category
- CSS
- Title
- aliceblue hex
- Category
- CSS
- Title
- scss gradient mixin
- Category
- CSS
- Title
- git stop merge
- Category
- CSS
- Title
- css ripple effect
- Category
- CSS