CSS transition fade in

CSS Keyframes support is pretty good these days: .fade-in { opacity: 1; animation-name: fadeInOpacity; animation-iteration-count: 1; animation-timing-function: ease-in; animation-duration: 2s; } @keyframes fadeInOpacity { 0% { opacity: 0; } 100% { opacity: 1; } } <h1 class=”fade-in”>Fade Me Down Scotty</h1>

Hover effects using CSS3 touch events

Use the :active pseudo-class in your css, then add ontouchstart=”” and onmouseover=”” to the body tag. The following code is excerpted from my site, in which I have buttons that get smaller and glow white when hovered(on pcs) or held down(on touch devices) <style> .boxbutton:active{ -webkit-transform:scale(0.9); -moz-transform:scale(0.9); -ms-transform:scale(0.9); -o-transform:scale(0.9); transform:scale(0.9); -webkit-box-shadow:0px 0px 20px #FFF; -moz-box-shadow:0px … Read more

CSS transition between left -> right and top -> bottom positions

You can animate the position (top, bottom, left, right) and then subtract the element’s width or height through a CSS transformation. Consider: $(‘.animate’).on(‘click’, function(){ $(this).toggleClass(“move”); }) .animate { height: 100px; width: 100px; background-color: #c00; transition: all 1s ease; position: absolute; cursor: pointer; font: 13px/100px sans-serif; color: white; text-align: center; } /* ↓ just to position … Read more

How To Add CSS3 Transition With HTML5 details/summary tag reveal?

This should fix it. details[open] summary ~ * { animation: sweep .5s ease-in-out; } @keyframes sweep { 0% {opacity: 0; margin-left: -10px} 100% {opacity: 1; margin-left: 0px} } <details> <summary>Copyright 1999-2014.</summary> <p> – by Refsnes Data. All Rights Reserved.</p> <p>All content and graphics on this web site are the property of the company Refsnes Data.</p> … Read more

when scaling an element with css3 scale, it becomes pixelated until just after the animation is complete. I’m animating an element with a border

Okay so i think i’ve come up with a work around; essentially; don’t use “scale”. use “scale3d” and have it setup so that the largest you want the image is scale3d(1,1,1). Here is an example with the circle thing you had in there. I changed the scale to 5, because i didn’t want to put … Read more

Delay mouseout/hover with CSS3 transitions

div { width: 70px; -webkit-transition: .5s all; -webkit-transition-delay: 5s; -moz-transition: .5s all; -moz-transition-delay: 5s; -ms-transition: .5s all; -ms-transition-delay: 5s; -o-transition: .5s all; -o-transition-delay: 5s; transition: .5s all; transition-delay: 5s; } div:hover { width:130px; -webkit-transition-delay: 0s; -moz-transition-delay: 0s; -ms-transition-delay: 0s; -o-transition-delay: 0s; transition-delay: 0s; } This will trigger the mouseover state right away, but wait 5 … Read more

Animate an element’s width from 0 to 100%, with it and it’s wrapper being only as wide as they need to be, without a pre-set width, in CSS3 or jQuery

I think I’ve got it. .wrapper { background:#DDD; display:inline-block; padding: 10px; height: 20px; width:auto; } .label { display: inline-block; width: 1em; } .contents, .contents .inner { display:inline-block; } .contents { white-space:nowrap; margin-left: -1em; padding-left: 1em; } .contents .inner { background:#c3c; width:0%; overflow:hidden; -webkit-transition: width 1s ease-in-out; -moz-transition: width 1s ease-in-out; -o-transition: width 1s ease-in-out; transition: … Read more