Home > Web Front-end > CSS Tutorial > How to add shadows to images using CSS

How to add shadows to images using CSS

不言
Release: 2018-04-21 15:49:26
Original
2695 people have browsed it

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;
Copy after login


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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template