css - How to make exception in coding for safari visitors? -
in part of code have css3 animation , seems not work on safari, it's fine on other browsers, so, make , exception, , if browser safari ignores animation part of code. here code:
download-music { background: transparent url(../images/dl-music.png) 0 0 no-repeat; float:left; width:110px; height:39px; text-indent:-9999px; opacity:0.5; -webkit-opacity: 0.5; -moz-opacity: 0.5; filter:alpha(opacity=40); /* ie8 , earlier */ transition: opacity .45s ease-in-out; -moz-transition: opacity .45s ease-in-out; -webkit-transition: opacity .45s ease-in-out; /* exception here */ -o-transition: opacity .45s ease-in-out; } .download-music:hover {-webkit-opacity:1 !important; -o-opacity:1; -moz-opacity:1; filter:alpha(opacity=100); }
selector hacks
1.
/* safari 2/3 */ html[xmlns*=""] body:last-child .selector {} html[xmlns*=""]:root .selector {}
2.
/* safari 6- , chrome 24- */ ::made-up-pseudo-element, .selector {}
3.
/* safari 2/3.1, opera 9.25 */ *|html[xmlns*=""] .selector {}
media query hacks
/* safari 3+, chrome */ @media screen , (-webkit-min-device-pixel-ratio:0) {}
javascript hacks
1.
/* safari 5- */ var issafari = /a/.__proto__=='//';
2.
/* safari */ var issafari = /constructor/.test(window.htmlelement);
source: http://browserhacks.com/
Comments
Post a Comment