in CSS

Cross Browser CSS Opacity Property

Internet Explorer With CSS3 new features most of the browsers don't use the same properties they need to be prefixed with the browser specific property. For example firefox is always prefixed with a -moz- and the chrome/sarafi is prefixed with a -webkit-. Below is a snippet to be used for cross browser transparency for the opacity property.


selector {
    filter: alpha(opacity=50); /* internet explorer */
    -khtml-opacity: 0.5;      /* khtml, old safari */
    -moz-opacity: 0.5;       /* mozilla, netscape */
    opacity: 0.5;           /* fx, safari, opera */
}

Upgrade to access all content on Paulund

Members unlock all tutorials and snippets

Access to all downloadable content

Access to code examples before others

Sign Up Now

Already a member? Login here

Subscribe To The Weekly Newsletter

Get weekly updates to your email