CSS3 – Transition and Visual Effects – Transition mithilfe CSS3



CSS3 – Transition and Visual Effects – Transition mithilfe CSS3

0 0


CSS3Transition


On Github WagT / CSS3Transition

CSS3

Transition and Visual Effects

von Tim Wagner

Transition mithilfe CSS3

.box {
  width: 200px;
  height: 200px;
  background: yellow;
  margin-top: 20px;
  margin-left: auto;
  margin-right: auto;
  transition: background-color 2s ease-out;
}

.box:hover {
   background-color: purple;
}
.box2 {
  width: 200px;
  height: 200px;
  background: yellow;
  margin-top: 20px;
  margin-left: auto;
  margin-right: auto;
  transition: all 3s;
}
.box2:hover{       
    transform: translate(50%) rotate(135deg) scale(0.5)
}

Weitere CSS Funktionen

  • CSS images: url()
  • blur()
  • brightness()
  • contrast()
  • custom()
  • grayscale()
  • invert()
  • linear-gradient
  • matrix()
  • perspective
  • repeating-radial-gradient
  • rotate3d()
  • rotateX()
  • rotateY()
  • rotateZ()
  • saturate()
  • scaleZ()
  • sepia()
  • skewX()
  • skewY()
  • translateZ()
  • var

Animation in CSS3

.box3{
    width: 100px;
    height: 100px;
    background-color: red;
    animation-name: example;
    animation-duration: 5s;
    animation-iteration-count: infinite
}

@keyframes example {
    from {background-color: red;}
    to {background-color: green;}
}
.box4
{
    width: 100px;
    height: 100px;
    background-color: red;
    animation-name: example2;
    animation-duration: 5s;
    animation-iteration-count: infinite
    animation-direction: alternate;
}

@keyframes example2 {
    0%   {background-color: red;}
    25%  {background-color: yellow;}
    50%  {background-color: blue;}
    100% {background-color: green;}
}

Quellen

Danke Für ihre Aufmerksakeit

CSS3 Transition and Visual Effects von Tim Wagner