- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to style images with CSS?
To style images with CSS, you need to use properties such as height, width, - moz-opacity, etc. Let us see how to create a transparent image with - moz-opacity CSS property:
The -moz-opacity property of an image is used to set the opacity of an image. This property is used to create a transparent image in Mozilla. IE uses filter:alpha(opacity=x) to create transparent images.
You can try to run the following code to style an image and set opacity with CSS:
<html> <head> </head> <body> <img style = "border:1px solid red;-moz-opacity:0.2;filter:alpha(opacity=50);" src = "https://www.tutorialspoint.com/assets/videotutorials/courses/css_online_training/380_course_215_image.jpg" /> </body> </html>
- Add style to images with Bootstrap
- How to style labels with CSS?
- How to add visual effects to images with CSS?
- How to style a header with CSS?
- How to style outline buttons with CSS?
- How to style download buttons with CSS?
- How to style text buttons with CSS?
- How to style round buttons with CSS?
- How to change background images on scroll with CSS?
- How to align images side by side with CSS?
- How to create rounded and circular images with CSS?
- How to style social media buttons with CSS?
- How to style an hr element with CSS?
- How to create Border Images in CSS