CSS Transitions and Animations

Slides:



Advertisements
Similar presentations
Software University Curriculum, Courses, Exams, Jobs SoftUni Team Technical Trainers Software University
Advertisements

Fundamentals SoftUni Welcome to Software University SoftUni Team Technical Trainers Software University
AngularJS Directives Defining Custom Directives SoftUni Team Technical Trainers Software University
Software Testing Lifecycle Exit Criteria Evaluation, Continuous Integration Ivan Yonkov Technical Trainer Software University.
Teamwork and Personal Skills Course Introduction Software University SoftUni Team Technical Trainers.
Svetlin Nakov Technical Trainer Software University
Test-Driven Development Learn the "Test First" Approach to Coding SoftUni Team Technical Trainers Software University
AMD and RequireJS Splitting JavaScript Code into Dependent Modules Software University Technical Trainers SoftUni Team.
Jekyll Static Site Generator Template-Based Site Generation Svetlin Nakov Technical Trainer Software University
Web Fundamentals (HTML and CSS) Course Introduction Svetlin Nakov Technical Trainer Software University
Web Development Tools Tools for Front-End Developers Writing HTML and CSS Code SoftUni Team Technical Trainers Software University
Web Fundamentals (HTML and CSS)
Responsive Design Design that Adapts to Different Devices SoftUni Team Technical Trainers Software University
Tables, Rows, Columns, Cells, Header, Footer, Colspan, Rowspan
CSS Transitions and Animations Animated HTML Elements SoftUni Team Technical Trainers Software University
Bootstrap Front-End Framework for Responsive Web Sites Svetlin Nakov Technical Trainer Software University
Test-Driven Development Learn the "Test First" Approach to Coding Svetlin Nakov Technical Trainer Software University
Sets, Dictionaries SoftUni Team Technical Trainers Software University
Creating Content Defining Topic, Creating Technical Training Materials SoftUni Team Technical Trainers Software University
Doctrine The PHP ORM SoftUni Team Technical Trainers Software University
Creating Content Defining Topic, Creating Technical Training Materials SoftUni Team Technical Trainers Software University
Stacks and Queues Processing Sequences of Elements SoftUni Team Technical Trainers Software University
Generics SoftUni Team Technical Trainers Software University
XML Processing SoftUni Team Database Applications Technical Trainers
Version Control Systems
Auto Mapping Objects SoftUni Team Database Applications
Databases basics Course Introduction SoftUni Team Databases basics
Data Structures Course Overview SoftUni Team Data Structures
Introduction to MVC SoftUni Team Introduction to MVC
PHP MVC Frameworks Course Introduction SoftUni Team Technical Trainers
PHP Fundamentals Course Introduction SoftUni Team Technical Trainers
Mocking tools for easier unit testing
State Management Cookies, Sessions SoftUni Team State Management
PHP MVC Frameworks MVC Fundamentals SoftUni Team Technical Trainers
C# Databases Advanced with Microsoft SQL Server
Entity Framework: Code First
Databases advanced Course Introduction SoftUni Team Databases advanced
Install and configure theme
Balancing Binary Search Trees, Rotations
Front-End Framework for Responsive Web Sites
Entity Framework: Relations
Fast String Manipulation
Functional Programming
Transactions in Entity Framework
C# Advanced Course Introduction SoftUni Team C# Technical Trainers
Databases Advanced Course Introduction SoftUni Team Databases Advanced
C# Web Development Basics
Best practices and architecture
Arrays and Multidimensional Arrays
Design & Module Development
Web Fundamentals (HTML and CSS)
Multidimensional Arrays, Sets, Dictionaries
Extending functionality using Collections
Exporting and Importing Data
Making big SPA applications
Functional Programming
C# Advanced Course Introduction SoftUni Team C# Technical Trainers
Course Overview, Trainers, Evaluation
Introduction to TypeScript & Angular
Train the Trainers Course
Software Quality Assurance
Directives & Forms Capturing User Input SoftUni Team
Version Control Systems
JavaScript Frameworks & AngularJS
Extending the Functionality of Collections
Text Processing and Regex API
/^Hel{2}o\s*World\n$/
Lean .NET stack for building modern web apps
CSS Transitions and Animations
Iterators and Generators
Presentation transcript:

CSS Transitions and Animations Animated HTML Elements Svetlin Nakov Technical Trainer www.nakov.com Software University http://softuni.bg © Software University Foundation – http://softuni.org This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike license.

Table of Contents CSS Transitions CSS Animation delay, duration, property, timing-function Sugar syntaxes CSS Animation delay, direction, duration, full-mode Iteration-count, name, play-state, timing-function © Software University Foundation – http://softuni.org This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike license.

CSS Transitions © Software University Foundation – http://softuni.org This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike license.

CSS Transitions Transition: changing from one style to another, without using Flash animations or script Work on 10.0+, 26.0+(4.0 -webkit-), 16.0+(4.0 -moz-) delay: when transition effect will start (in seconds) duration: how many time to complete (seconds or milliseconds) property: which CSS property name transition effect is for timing-function: speed curve of the transition effect linear: same speed from start to the end ease: (default) slow start, fast middle, then end slowly © Software University Foundation – http://softuni.org This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike license.

CSS Transition – Example Long syntax: Short syntax: .transition-only-width { width: 100px; transition-property: width; transition-delay: 500ms; transition-duration: 2s; transition-timing-function: linear; } .transition-only-width: hover { width: 400px; .transition-only-width { width:100px; transition: width linear 2s; } .transition-only-width:hover { width:400px; © Software University Foundation – http://softuni.org This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike license.

Transition: Multiple Changes We can initialize more than one property in one transition .transition-only-width { width: 100px; height: 100px; background-color: tomato; transition: width linear 2s, height 2s, background-color 2s; } .transition-only-width:hover { width: 400px; height: 400px; background-color: pink !important; © Software University Foundation – http://softuni.org This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike license.

CSS Transitions Live Demo

Animation © Software University Foundation – http://softuni.org This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike license.

CSS Animation: @keyframe Initializes a named “variable” which defines animation lifecycle @keyframe changing-background { 0%   {background: red;}     25%  {background: yellow;}     50%  {background: blue;}     100% {background: green;} } @keyframe red-to-yellow { from {background: red;}     to {background: yellow;}

Animation Animation: create animations which can replace Flash animations, animated images, and JavaScripts in existing web pages. Support: 10.0+, 26.0+ (4.0-webkit-), 16.0 (5.0 -moz-) delay: when animation will start direction: play in reverse on alternate cycles or opposite fill-mode: styles apply for tags when the animation is not playing iteration-count: replay animations name: name of the @keyframes animation play-state: running or paused timing-function: speed curve of the animation

CSS @keyframe Animations Live Demo

CSS Transitions and Animations https://softuni.bg/courses/web-fundamentals/ © Software University Foundation – http://softuni.org This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike license.

License This course (slides, examples, demos, videos, homework, etc.) is licensed under the "Creative Commons Attribution- NonCommercial-ShareAlike 4.0 International" license Attribution: this work may contain portions from "HTML Basics" course by Telerik Academy under CC-BY-NC-SA license "CSS Styling" course by Telerik Academy under CC-BY-NC-SA license © Software University Foundation – http://softuni.org This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike license.

SoftUni Diamond Partners

Free Trainings @ Software University Software University Foundation – softuni.org Software University – High-Quality Education, Profession and Job for Software Developers softuni.bg Software University @ Facebook facebook.com/SoftwareUniversity Software University @ YouTube youtube.com/SoftwareUniversity Software University Forums – forum.softuni.bg © Software University Foundation – http://softuni.org This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike license.