Home >Web Front-end >CSS Tutorial >How to add shadows to images using CSS
Generally, we can use the background image to add shadows to images, but how to achieve this for images with non-fixed sizes? We can use the "visual deception method" to achieve this by defining a gradient border: [code] on_all">
Generally, we can use the background image to add shadows to pictures, but how to achieve this for pictures with non-fixed sizes? We can use the "visual deception method" to achieve this by defining a gradient border:
Tip: You can Modify part of the code first and then run it
The following definition is the definition of rounded corners in various standard browsers to deceive the eyes more professionally
Copy code
The code is as follows:
border-radius:5px; -moz-border-radius:5px; -webkit-border-radius:5px;
The color code can be found at Pick it up after making the outer glow effect in PS. My above effects are [Soft], [Extended 0], [Size 5px], [Color #000] and the rest are default
Of course, if you have special requirements, you can use IE filters to achieve more gorgeous shadows.
The above is the detailed content of How to add shadows to images using CSS. For more information, please follow other related articles on the PHP Chinese website!