> For the complete documentation index, see [llms.txt](https://lochiwei.gitbook.io/web/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lochiwei.gitbook.io/web/css/design/shadows.md).

# CSS shadows

{% tabs %}
{% tab title="⭐️ 重點" %}
{% hint style="info" %}

1. The [**box-shadow**](https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow) property represents the **light source's position** using **horizontal** and **vertical offsets**.
2. each shadow should use the **same ratio** between these two numbers.
3. As an element **gets closer** to the **user**, the **offset** should **increase** ⬆️, the **blur radius** should **increase** ⬆️, and the shadow's **opacity** should **decrease** ⬇️.
   {% endhint %}
   {% endtab %}

{% tab title="📘 手冊" %}

* MDN ⟩&#x20;
  * [box-shadow](https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow)
  * [filter](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function): [drop-shadow()](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/drop-shadow\(\))
    {% endtab %}

{% tab title="📗 參考" %}

* [ ] CSSTricks ⟩ [box-shadow](https://css-tricks.com/almanac/properties/b/box-shadow/)
* [ ] Josh Comeau ⟩ [Designing Beautiful Shadows in CSS](https://www.joshwcomeau.com/css/designing-shadows/) ❤️
* [ ] Tobias ⟩ [Smoother & sharper shadows with layered box-shadows](https://tobiasahlin.com/blog/layered-smooth-box-shadows/) ❤️
  {% endtab %}

{% tab title="🛠 工具" %}

* [Smooth Shadow](https://shadows.brumm.af/) ❤️
  {% endtab %}

{% tab title="Untitled" %}

* [shadows](/web/browser/canvas/state/shadow.md)
  {% endtab %}
  {% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://lochiwei.gitbook.io/web/css/design/shadows.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
