Fun with transition
How do I make an fun with transition?
An instructional demo of transition for the 2015 HTML and CSS3 Best Practices class at Startup Institute Boston.. What is a fun with transition? How do you make a fun with transition? This script and codes were developed by Paul Demers on 28 August 2022, Sunday.
Fun with transition - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Fun with transition</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel='stylesheet prefetch' href='css/cdbdd22df1a82e2eacfc4fb16.css'> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ .effect-example { width: 40rem; height: 8rem; display: block; margin: 0 auto 1rem; border: 5px solid rgba(255, 255, 255, 0.25); cursor: pointer; display: table;
}
.effect-example-square { height: 12rem; width: 12rem;
}
.effect-name { font-weight: bold; font-size: 2rem; color: #fff; text-align: center; line-height: 1; margin: 0; display: table-cell; vertical-align: middle;
}
.effect-grow { transition-property: width; transition-duration: .5s; transition-timing-function: linear; background: rebeccapurple;
}
.effect-grow:hover { width: 50rem;
}
.effect-rotate { transform: rotate(0deg); background: grey; transition: transform .5s ease-in-out;
}
.effect-rotate:hover { transform: rotate(360deg);
}
.effect-wheel { border-radius: 50%; margin-left: -1.25rem; transform: rotate(0deg); background: blue; transition: transform .5s ease-in-out, margin-left .5s ease-in-out;
}
.effect-wheel:active { margin-left: 40rem; transform: rotate(360deg);
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <header> <h1>Fun with <code>transition</code></h1> <div class="si-logo"> <img src="https://d2e1tcbrruuso7.cloudfront.net/static/images/si-logo-white.9e7839aec491.svg" alt="" /> </div>
</header>
<div class="container"> <section class="property"> <div class="property-example"> <h2 class="property-header">Grow on Hover Example:</h2> <p>Hover over the purple rectangle to see it grow</p> <div class="effect-example effect-grow"> <p class="effect-name">I grow on hover!</p> </div> <code class="language-markup">
.example{ /* The property you want to transition */ transition-property: width; /* How long you want the transition to take */ transition-duration: .5s; /* linear | ease-in | ease-out | ease-in-out */ transition-timing-function: linear;
} </code> </div> <div class="property-example"> <h2 class="property-header">Rotate on Hover Example:</h2> <p>Hover over the purple rectangle to see it rotate</p> <div class="effect-example effect-example-square effect-rotate"> <p class="effect-name">I rotate on hover!</p> </div> <code class="language-markup">
.example{ transform: rotate(0deg); background: grey; /* transition can be written in shorthand format */ /* transition-property transition-duration transition-timing-property */ transition: transform .5s ease-in-out;
}
.example:hover{ transform: rotate(360deg);
} </code> </div> <div class="property-example"> <h2 class="property-header">Spinning Wheel on Click Example:</h2> <p>Click on the wheel to see it move and spin.</p> <div class="effect-example effect-example-square effect-wheel"> <p class="effect-name">Click the wheel!</p> </div> <code class="language-markup">
.example{ border-radius: 50%; margin-left: -1.25rem; transform: rotate(0deg); background: blue; /* Transition multiple properties at the same time */ transition: transform .5s ease-in-out, margin-left .5s ease-in-out;
}
.example:active{ margin-left: 40rem; transform: rotate(360deg);
} </code> </div> <article> <h2>More Info:</h2> <ul> <li><a href="http://caniuse.com/#search=box-shadow" title="transition on Caniuse" target="_blank">Caniuse</a></li> <li><a href="http://autoprefixer.github.io/" title="transition on AutoPrefixer" target="_blank">Autoprefixer</a></li> <li><a href="http://codepen.io/search?q=transition&limit=all&depth=everything&show_forks=false" title="transition on CodePen" target="_blank">transition on CodePen</a></li> </ul> </article> </section>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/prism/0.0.1/prism.min.js'></script>
</body>
</html>
Fun with transition - Script Codes CSS Codes
.effect-example { width: 40rem; height: 8rem; display: block; margin: 0 auto 1rem; border: 5px solid rgba(255, 255, 255, 0.25); cursor: pointer; display: table;
}
.effect-example-square { height: 12rem; width: 12rem;
}
.effect-name { font-weight: bold; font-size: 2rem; color: #fff; text-align: center; line-height: 1; margin: 0; display: table-cell; vertical-align: middle;
}
.effect-grow { transition-property: width; transition-duration: .5s; transition-timing-function: linear; background: rebeccapurple;
}
.effect-grow:hover { width: 50rem;
}
.effect-rotate { transform: rotate(0deg); background: grey; transition: transform .5s ease-in-out;
}
.effect-rotate:hover { transform: rotate(360deg);
}
.effect-wheel { border-radius: 50%; margin-left: -1.25rem; transform: rotate(0deg); background: blue; transition: transform .5s ease-in-out, margin-left .5s ease-in-out;
}
.effect-wheel:active { margin-left: 40rem; transform: rotate(360deg);
}
![Fun with transition - Script Codes](http://shots.codepen.io/demersdesigns/pen/yNpGpd-512.jpg)
Developer | Paul Demers |
Username | demersdesigns |
Uploaded | August 28, 2022 |
Rating | 3 |
Size | 5,264 Kb |
Views | 62,744 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Air Quality Gauge | 5,812 Kb |
Project Timeline | 9,790 Kb |
Icon Font Social Icons | 2,920 Kb |
A Pen by Paul Demers | 2,526 Kb |
Fancy Radios, Checkboxes, and Selects | 6,801 Kb |
Fullscreen Overlay | 5,310 Kb |
Project Timeline Visualization | 10,115 Kb |
Animated Gradient Text Backgrounds | 2,927 Kb |
Icon Fonts and CSS3 Animations | 3,288 Kb |
Half Circle Hover Effect | 3,213 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Simple blog concept | Drew_mc | 2,666 Kb |
Expert Help | SinceSidSlid | 4,064 Kb |
Scrolling Horizontal Isotope | Bramus | 2,017 Kb |
Segments mouse following | Nosir | 2,909 Kb |
Social Profiles | Lachlanjc | 1,939 Kb |
Learning canvas drawing | Aurer | 2,204 Kb |
Tiling Subdivision | Francext | 3,937 Kb |
Basic HTML5 Structure | YuvarajTana | 1,289 Kb |
Bootstrap example | Ssaakkaa | 2,716 Kb |
Css3 only dropdown menu | Riogrande | 2,519 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!