http://www.sitepoint.com/an-introduction-to-css-supports-rule-feature-queries/
http://www.sitepoint.com/exploring-classlist-api
http://www.sitepoint.com/creating-vintage-television-using-bem-css3-javascript
Blending images and text:
http://www.sitepoint.com/close-up-css-mix-blend-mode-property/
Rotation:
HTML clocks using JavaScript and CSS rotation
Gradient:
http://www.sitepoint.com/css-gradients-a-syntax-crash-course
Cross browser CSS Gradient
Speed Up with CSS3 Gradients
CSS3 Linear Gradients
CSS Gradient
Transformation:
Cross Browser CSS Transforms – even in IE
Rotate Elements with CSS Transformations
Animation:
http://coding.smashingmagazine.com/2011/09/14/the-guide-to-css-animation-principles-and-examples/ - *
http://www.webdeveloperjuice.com/2010/02/25/10-shocking-animations-using-css-and-i-mean-only-css/ - *
http://www.sitepoint.com/syncing-css-animations-with-html5-audio
http://www.sitepoint.com/animation-keyframe-gotcha/
Transition:
CSS Transitions 101
Fading Button Background Images With CSS3 Transitions
http://www.sitepoint.com/advanced-css3-transitions/
http://www.sitepoint.com/css3-transitions-cubic-bezier-timing-function/
Reflection:
Web Directions Reflections, part 4: Hardboiled Web Design and SVG Salutations
Image Reflections with CSS
Progress bar:
Progress Trackers in Web Design: Examples and Best Practices
CSS3:
http://www.sitepoint.com/moonlighting-css-text-shadow/
http://www.sitepoint.com/css3-inheritance-tips-tricks
http://www.sitepoint.com/animate-css-css3-animation/
http://www.sitepoint.com/css3-box-shadow-elements/
CSS3 loading spinners without images
http://www.impressivewebs.com/css3-glow-tabs/
Our Solar System in CSS3
Understanding border-image
How To Create Depth And Nice 3D Ribbons Only Using CSS3
Rotating billboard using only CSS3
http://www.smashingmagazine.com/2011/05/03/using-css3-older-browsers-and-common-considerations/
http://net.tutsplus.com/tutorials/html-css-techniques/diving-into-css-regions/
How to Resize Background Images with CSS3
http://www.sitepoint.com/screencast-getting-started-css3-animation-examples/
http://www.sitepoint.com/css3-animation-javascript-event-handlers/
http://css-tricks.com/viewport-sized-typography/
http://cssglobe.com/pure-css3-post-tags/
http://cssglobe.com/styling-full-width-tabs-with-css3
http://benfrain.com/understanding-the-css3-flexbox-flexible-box-layout-module/
http://www.sitepoint.com/getting-to-know-css3-selectors-structural-pseudo-classes
http://net.tutsplus.com/tutorials/html-css-techniques/say-hello-to-css3-filters/
http://www.sitepoint.com/getting-to-know-css3-selectors-other-pseudo-classes/
http://net.tutsplus.com/tutorials/html-css-techniques/10-css3-properties-you-need-to-be-familiar-with/
http://net.tutsplus.com/tutorials/html-css-techniques/build-awesome-practical-css3-buttons/
http://net.tutsplus.com/tutorials/html-css-techniques/quick-tip-getting-clever-with-css3-shadows/
http://net.tutsplus.com/tutorials/html-css-techniques/quick-tip-a-crash-course-in-css-media-queries/
http://net.tutsplus.com/tutorials/html-css-techniques/take-advantage-of-css3-to-achieve-subtle-design/
http://net.tutsplus.com/tutorials/html-css-techniques/quick-tip-the-multi-column-css3-module/
http://net.tutsplus.com/tutorials/html-css-techniques/the-state-of-css3-in-email-templates/
http://www.sitepoint.com/advanced-css3-2d-and-3d-transform-techniques
http://www.sitepoint.com/new-css3-relative-font-size/
http://www.sitepoint.com/css3-video-tutorial-nth-of-type-selector
http://www.sitepoint.com/css3-video-tutorial-box-sizing/
http://designfestival.com/5-extremely-useful-but-rarely-used-css3-properties/
http://www.sitepoint.com/css3-columns-and-paged-reflowable-content/
http://www.sitepoint.com/better-css3-toggle-switches/
http://www.sitepoint.com/css3-transition-properties/
http://www.sitepoint.com/css3-transitions-101/
http://www.sitepoint.com/css3-animations-101/
http://www.sitepoint.com/css3-rem-units/
http://www.sitepoint.com/advanced-css3-animations/
http://www.sitepoint.com/css3-animations-javascript-api/
http://www.sitepoint.com/a-beginners-guide-css-regions
What is the purpose of the will-change property?
The will-change CSS property allows an author to inform the UA ahead of time of what kinds of changes they are likely to make to an element. This allows the UA to optimize how they handle the element ahead of time, performing potentially-expensive work preparing for an animation before the animation actually begins.
How is will-change used?
The will-change property is only effective when used at a certain time. We can’t apply something like will-change: transform to an already-transforming element — it just doesn’t make sense.
.will-change:active {
will-change: transform;
transition: transform 0.3s;
transform: scale(1.5);
}
Here, a change is already taking place by the time we inform the browser, totally cancelling out the whole point of the will-change property. If we want the browser to know ahead of time when to expect changes, we will have to inform it at the right moment. For an element to achieve an active state, it must first be hovered. We can then do something like this:
.will-change {
transition: transform 0.3s;
}
.will-change:hover {
will-change: transform;
}
.will-change:active {
transform: scale(1.5);
}
This small example gives us some insight into the thought process needed to properly use the will-change property. But before we continue with more examples, we need to be aware of some important considerations. Browsers, by nature, try their absolute best to optimise and be prepared for changes. Browsers will remove certain optimizations as soon as they can in order to free up memory. Using the will-change property directly on an element, though, insists to the browser that the element in question is always very close to a change. This forces the browser to maintain optimizations, thus increasing memory consumption. With that in mind, we need to have a way of adding and removing the will-change property at the right times. The first example does this for us, because the property will only get added on hover. But what if we wanted the transform to actually occur on hover? You might be tempted to do this:
.will-change {
will-change: transform;
transition: transform 0.3s;
}
.will-change:hover {
transform: scale(1.5);
}
This will result in an increase in memory consumption though, because we’re forcing the browser into thinking that the element is close to being changed at all times. We can get around this by instead looking for a hover event on the parent container:
.will-change-parent:hover .will-change {
will-change: transform;
}
.will-change {
transition: transform 0.3s;
}
.will-change:hover {
transform: scale(1.5);
}
This adds the optimization when the mouse enters the parent container, and removes it when the mouse leaves. It also, however, implies that every time the mouse enters the parent container, the browser can expect a change on the element. This isn’t necessarily the case, and presents a perfectly clear example of how easy it is to abuse this property.
How to add or remove the will-change property using JavaScript?
var el = document.querySelector('.element');
el.addEventListener('mouseenter', hintBrowser);
el.addEventListener('animationEnd', removeHint);
function hintBrowser() {
this.style.willChange = 'transform';
}
function removeHint() {
this.style.willChange = 'auto';
}
Of course, you’d need to include the necessary JavaScript to add the correct clicked class when the element is actually clicked, but the above script should give you some insight into how to prepare the browser for changes, and to release memory once the changes are complete. When the mouse enters the element, the will-change property is added. When it’s clicked and the transform occurs (by your corresponding script), animation events will be sent out. On animationEnd we’ll remove the will-change property, freeing up memory once again.
- http://www.sitepoint.com/introduction-css-will-change-property/ - done reading
- http://dev.w3.org/csswg/css-will-change/
- https://dev.opera.com/articles/css-will-change-property/
- https://developer.mozilla.org/en-US/docs/Web/CSS/will-change
- http://www.html5rocks.com/en/tutorials/speed/high-performance-animations/