Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device.
Atlassian cookies and tracking notice, (opens new window)
Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
Confluence

Web Development
  • Web Development
    Web Development
Results will update as you type.
  • A basic Barchart
  • Absolute Positioning
  • Code Editors
  • CSS
  • CSS Animations
  • CSV Transformation with node.js
  • d3.js
  • Desktop Source Compilers
  • Homebrew
  • Hosting Services
  • HTML CSS Javascript Resources
  • Interactive Visualization
  • jQuery
  • Mobile Optimization
  • node.js
  • Page-High Resizable Containers
  • Scrollable Visualization
  • Simple Layout Techniques
  • SVG
  • SVG Visualization
  • Terminal
  • UI Prototyping Tools
  • Version Control with GitHub

    You‘re viewing this with anonymous access, so some content might be blocked.
    /
    CSS Animations
    Updated Oct 01, 2015

      CSS Animations

      Oct 01, 2015

      Find examples here.

      Transitions

      With transitions you can animate basic property changes easily:

      .box { width: 100px; height: 100px; transform: none; transition: width 2s, height 2s, transform 2s; } .box:hover { width: 200px; height: 200px; transform: rotate(180deg); }
      • When hovering over this box the browser will animate the transition of the defined values.

      The transition property has the following syntax:

      transition: <property> <duration> <timing-function> <delay>


      The timing function can be one of the following:

      linear | ease-in | ease-out | ease-in-out

      Keyframes

      With keyframes you can create more complex animations:

      @keyframes sunrise { 0% { bottom: 0; left: 340px; background: #f00; } 33% { bottom: 340px; left: 340px; background: #ffd630; } 66% { bottom: 340px; left: 40px; background: #ffd630; } 100% { bottom: 0; left: 40px; background: #f00; } } .sunrise { animation-name: sunrise; animation-duration: 10s; animation-timing-function: ease; animation-delay: 1s; animation-iteration-count: 1; }

      This animation can be triggered by adding the class sunrise to an element by using for example jQuery:

      $('.element').addClass('sunrise');

      The shorthand notion syntax is as follows:

      animation: <name> <duration> <timing-function> <delay> <iteration-count>;
      {"serverDuration": 64, "requestCorrelationId": "47cc0415007741d0931d65cf880e6875"}