Software, your way.
How To Get Good Custom Software
(Download)
(PDF)
burger menu icon
WillMaster

WillMaster > LibraryWeb Page and Site Features

FREE! Coding tips, tricks, and treasures.

Possibilities weekly ezine

Get the weekly email website developers read:

 

Your email address

name@example.com
YES! Send Possibilities every week!

CSS Drop Shadows for Images

The CSS filter property can be used in many ways. This article addresses only the drop-shadow() value.

Here is an example to illustrate the drop-shadow effect. You'll see a red drop shadow for a dark-cloud image.

Here is the source code for the above.

<img src="https://www.willmaster.com/possibilities/images/possart20241015.jpg" 
style="
   filter:drop-shadow(9px 16px 7px #8b0909);<
   max-width:100%;">

The first value is the width of the drop shadow for the right side of the image. To put the drop shadow on the left size, use a negative number. For no left and no right shadow, specify 0 (zero).

The second value is the width of the drop shadow for the bottom of the image. To put the drop shadow on the top, use a negative number. For no top and no bottom shadow, specify 0 (zero).

The third value is the width of blur. If the blur is specified as 0 (zero), the shadow has no blur. If the blur width is equal to a shadow, the entire shadow is affected by the blur. If the blur is larger than a shadow, the blur is larger than the shadow and is also likely to extend out the non-shadow side of the image.

The fourth value is the color of the shadow. It may have any HTML color value.

The CSS filter property is quickly implemented when a drop shadow for an image would have a positive effect on the web page design.

(This content first appeared in Possibilities newsletter.)

Will Bontrager

Was this article helpful to you?
(anonymous form)

Support This Website

Some of our support is from people like you who see the value of all that's offered for FREE at this website.

"Yes, let me contribute."

Amount (USD):

Tap to Choose
Contribution
Method

All information in WillMaster Library articles is presented AS-IS.

We only suggest and recommend what we believe is of value. As remuneration for the time and research involved to provide quality links, we generally use affiliate links when we can. Whenever we link to something not our own, you should assume they are affiliate links or that we benefit in some way.

How Can We Help You? balloons
How Can We Help You?
bullet Custom Programming
bullet Ready-Made Software
bullet Technical Support
bullet Possibilities Newsletter
bullet Website "How-To" Info
bullet Useful Information List

© 1998-2001 William and Mari Bontrager
© 2001-2011 Bontrager Connection, LLC
© 2011-2024 Will Bontrager Software LLC