Dino Geek, try to help you

How to apply a drop shadow to an element with CSS?


To apply a drop shadow effect on an element in CSS, you would use the “box-shadow” property. The box-shadow property attaches one or more shadows to an element.

It has the following syntax:

```
box-shadow: h-offset v-offset blur-radius spread-radius color;
```

- h-offset: sets the horizontal offset of the shadow. If positive, the shadow will be on the right of the box, if negative, it will be on the left.
- v-offset: sets the vertical offset of the shadow. If positive, the shadow will be below the box, if negative, above.
- blur-radius: define the blur radius of the shadow. The higher the number, the more blurred the shadow will be.
- spread-radius: optional. If positive, it will increase the size of the box shadow; if negative, it will decrease it.
- color: sets the color of the shadow.

An example:

```
element { box-shadow: 5px 5px 10px rgba(0,0,0,0.5);
}
```

This will apply a shadow that is displaced 5 pixels to the right and 5 pixels down from the element. The shadow is slightly blurred (10 pixels blur radius). The color of the shadow is black with 50% transparency.


Simply generate articles to optimize your SEO
Simply generate articles to optimize your SEO





DinoGeek offers simple articles on complex technologies

Would you like to be quoted in this article? It's very simple, contact us at dino@eiki.fr

CSS | NodeJS | DNS | DMARC | MAPI | NNTP | htaccess | PHP | HTTPS | Drupal | WEB3 | LLM | Wordpress | TLD | Domain name | IMAP | TCP | NFT | MariaDB | FTP | Zigbee | NMAP | SNMP | SEO | E-Mail | LXC | HTTP | MangoDB | SFTP | RAG | SSH | HTML | ChatGPT API | OSPF | JavaScript | Docker | OpenVZ | ChatGPT | VPS | ZIMBRA | SPF | UDP | Joomla | IPV6 | BGP | Django | Reactjs | DKIM | VMWare | RSYNC | Python | TFTP | Webdav | FAAS | Apache | IPV4 | LDAP | POP3 | SMTP

| Whispers of love (API) | Déclaration d'Amour |






Legal Notice / General Conditions of Use