1 Sept 2015

Cross-Browser Transparency

Cross-Browser Transparency

Not all browsers currently support the CSS3 opacity property. However we can still make transparency work across browsers.
1.element { 
2    filter:alpha(opacity=50); 
3    -moz-opacity:0.5
4    -khtml-opacity: 0.5
5    opacity: 0.5
6}
From the bottom up:
opacity is the CSS standard and will work in current Webkit and Mozilla browsers as well as Opera
  • -moz-opacity is for older versions of Mozilla Browsers
  • -khtml-opacity is for older versions of Safari and any browser using the khtml rendering engine
  • filter:alpha(opacity=50) is for Internet Explorer
Share:

0 comments:

Post a Comment