CSS sets the transparency of the image

IE9, Firefox, Chrome, Opera, and Safari browsers use the transparency property to make the image opaque. The value of the Opacity attribute ranges from 0.0-1.0. The smaller the value, the more transparent the element.
IE8 and earlier versions use filter: alpha(opacity=x) . The value x can take is from 0-100. A lower value makes the element more transparent.
CSS style:

img
{
  opacity:0.4;
  filter:alpha(opacity=40); /*  IE8 及其更早版本 */
}
img:hover
{
  opacity:1.0;
  filter:alpha(opacity=100); /* IE8 及其更早版本 */
}

Guess you like

Origin blog.csdn.net/Serena_tz/article/details/114059619