Hi. I am new to Modernizr, I read the documentations, installed it and created my custom .js build selecting CSS Transitions (also tried selecting all options). I do have Libraries module, so I put my modernizr.min.js to sites/all/libraries/modernizr/ and Status report shows that Modernizr is loaded, it is also loaded first in the source, right before jquery .js and the rest of avalable .js files.
All I want on IE8 is to make the transition work:
.view-top-menu ul li .views-field-field-link a {
color: #FFF;
display: block;
line-height: 53px;
}
.view-top-menu ul li .views-field-field-link a:hover {
background: #006862;
text-decoration: none;
-moz-transition-property: background; /* FF4+ */
-moz-transition-duration: 1s;
-webkit-transition-property: background; /* Saf3.2+, Chrome */
-webkit-transition-duration: 1s;
-o-transition-property: background; /* Opera 10.5+ */
-o-transition-duration: 1s;
-ms-transition-property: background; /* IE10? */
-ms-transition-duration: 1s;
transition-property: background; /* Standard */
transition-duration: 1s;
}
It works on FF, Chrome and Opera. What it does is when you hover your Mouse over a link, the background smoothly transfers to the set background color in the CSS. In IE it currently doesn't transfer, it changes in a blink (by default).
Like I said, I am new to this and maybe I am missing something?
Comments
Comment #1
tamasd CreditAttribution: tamasd commentedModernizr is for detecting HTML5/CSS3 features, not for implementing it in older browsers.
What you can do is to use the CSS selectors, and either supply an alternative CSS or use JavaScript where the feature you wanted is not available.
Comment #2
ruplYorirou is correct. Modernizr is designed to detect features only, with little part in implementing a solution to provide missing ones. The minor role it can play is providing an easy way for loading a polyfill to provide the functionality. Simply use the Modernizr.load() API available within the module. You have two options:
Within your theme's info file
Within your theme's template.php file
For more info see
hook_modernizr_load()
examples inside modernizr.api.phpComment #2.0
ruplfix