Quantcast
Channel: Ajaxian » HTML
Viewing all articles
Browse latest Browse all 20

HTML5 and CSS3 Readiness Visualization

$
0
0

html5cssreadiness

Paul Irish and Divya Manian have created a fun visualization on readiness of HTML5 and CSS3 standards in various browsers.

It uses a bunch of the usual CSS cool-suspects: -webkit-gradient, -webkit-transition, -webkit-border-radius, and the like (and -moz/-o too).

The added feature is.... do a mouse scroll on the page:

JAVASCRIPT:
  1.  
  2. jQuery(document).bind('DOMMouseScroll mousewheel', function(e, delta) {
  3.     var newval,
  4.         num = $('div.css-chart p').css('padding-left');
  5.  
  6.     delta = delta || e.detail || e.wheelDelta;
  7.  
  8.     if (delta> 0 || e.which == 38) {
  9.         newval = parseFloat(num) + 10 * (e.shiftKey ? .1 : 1);
  10.     } else if (delta <0 || e.which == 40) {
  11.         newval = parseFloat(num) - 10 * (e.shiftKey ? .1 : 1);
  12.     } else {
  13.         return true;
  14.     }
  15.    
  16.     $('style.padleft').remove();
  17.     $('<style class="padleft"> div.css-chart p { padding-left : '+newval+'px; }')
  18.         .appendTo(document.body);
  19.  
  20.     e.preventDefault();
  21.  
  22. })
  23.  

Viewing all articles
Browse latest Browse all 20

Trending Articles