Back to CSS Notes
Topic #144

Image Effects

Image effects like filters, grayscale and blur transform photos with CSS. Hover effects on gallery images come from these properties.


CSS Image Opacity

The opacity property specifies the opacity/transparency of an element.

The opacity property can take a value from 0.0 - 1.0:

  • 0.0 - The element will be completely transparent
  • 0.5 - The element will be 50% transparent
  • 1.0 - Default. The element will be fully opaque

Example

img {
  opacity: 0.5;
}

Tip: Look at the CSS Image Filters chapter to learn how to use the filter property to add visual effects (like opacity, blur, saturation, etc.) to images.


Image Text Positioning

How to position text in an image:

Example

<div style="position:relative;text-align:center;">
<img alt="Cingue Terre" src="img_5terre_wide.jpg" style="width:100%;height:auto;opacity:0.3"/>
<div style="position:absolute;bottom:8px;left:16px;font-size:18px">Bottom Left</div>
<div style="position:absolute;top:8px;left:16px;font-size:18px">Top Left</div>
<div style="position:absolute;top:8px;right:16px;font-size:18px">Top Right</div>
<div style="position:absolute;bottom:8px;right:16px;font-size:18px">Bottom Right</div>
<div style="position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);font-size:18px">Centered</div>
</div>

Want to go beyond the notes?

Join Coding Now Tech Institute's CSS course — live mentorship, real projects, and 100% placement support.

Enroll Now — Free Demo Available

Image Effects – FAQs

Quick answers about learning Image Effects in CSS.

This free note from Coding Now Tech Institute explains Image Effects in CSS — concept, syntax and worked code examples you can copy, run and revise before interviews.
Yes. Every CSS topic on Coding Now Tech Institute, including Image Effects, is 100% free with no signup required.
With focused practice, most students grasp Image Effects in 1–3 days from these notes; pairing it with Coding Now Tech Institute's mentor-led course takes you to job-ready depth faster.
Use the code examples in this note, then ask doubts for free on the Coding Now Tech Institute Community (/community) — expert instructors answer within 24 hours.
Call NowEnroll Now