Image Transparency / CSS Opacity.


The opacity property can take a value from 0.0 - 1.0. The lower value, the more transparent. The opacity property is often used together with the :hover selector to change the opacity on mouse-over.


img {
  opacity: 0.5;
  filter: alpha(opacity=50); /* For IE8 and earlier */
}
img:hover {
  opacity: 1.0;
  filter: alpha(opacity=100); /* For IE8 and earlier */
}

No comments:

Post a Comment

Python in AI: Getting Started with TensorFlow & PyTorch

  Artificial Intelligence (AI) is no longer just a buzzword. It powers recommendation systems, chatbots, self-driving cars, and more. At the...