'How to implement opacity compatible in both IE5 and IE11
I am trying to render a form with opacity = 0.5 & disable the actions of elements on a button click , it works well in IE11 but fails in IE 5 .
<script>
function opaqueForm(){
var form = document.getElementById('myFormName'),s,opacity;
s = form.style;
s.filter = 'alpha(opacity=50)';
s.opacity = 50/100
for(var i=0;i<form.length;i++) form[i].disabled=true;
}
</script>
When I tried to check the DOM explorer to see how it is rendered , I see in IE 5 the filter is applied to the form and opacity is not applied . The form is not rendered opaque in IE5.
Can anyone suggest how to style the form to render it opaque in both IE5 and IE11 Thanks in advance for any suggestions & solutions.
Solution 1:[1]
You would probably be safe not expending effort supporting a browser that reached end of life two decades ago.
But, for historical curiosity, it turns out (to my surprise) that what you want is actually possible! Versions of Internet Explorer from v5.5 through v8 used a proprietary -ms-filter property instead of standards (as is true of many IE features; this was during the "Embrace and Extend" era.)
The syntax for opacity looked something like this:
{ filter:progid:DXImageTransform.Microsoft.Alpha(opacity = 100 ... ) ... }
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
