|
8 | 8 | <style type="text/css"> |
9 | 9 | .rhs { white-space: pre-wrap; } |
10 | 10 | code { font-size: inherit; } |
| 11 | + #box-shadow-samples td { background: white; color: black; } |
11 | 12 | </style> |
12 | 13 | <link rel="stylesheet" type="text/css" |
13 | 14 | href="http://www.w3.org/StyleSheets/TR/W3C-WD.css"> |
@@ -2464,20 +2465,98 @@ <h3 id="the-box-shadow">The 'box-shadow' property</h3> |
2464 | 2465 | (below the borders and border-image, if any). |
2465 | 2466 |
|
2466 | 2467 | <div class="example"> |
2467 | | -<p>Here is an example of single words with a drop shadow. Assume the |
2468 | | -words were enclosed in <span class="html"><span></span> and the |
2469 | | -style rule was |
2470 | | - |
2471 | | -<pre>span {border: thin solid; box-shadow: 0.2em 0.2em #CCC}</pre> |
2472 | | - |
2473 | | -<p>The result might look like this: |
2474 | | - |
2475 | | -<div class=figure> |
2476 | | - <p><img alt="He will be put on b_r_e_a_d_| and w_a_t_e_r_|" |
2477 | | - src="box-shadow.png"> |
2478 | | -</div> |
2479 | | -</div> |
2480 | | - |
| 2468 | +<p>Below are some examples of an orange box with a blue border being |
| 2469 | + being given a drop shadow.</p> |
| 2470 | + |
| 2471 | +<table class="data" id="box-shadow-samples"> |
| 2472 | + <tr> |
| 2473 | + <th scope="rowgroup"> |
| 2474 | + <pre><code><!-- |
| 2475 | + -->border:5px solid blue; |
| 2476 | +<!-- -->background-color:orange; |
| 2477 | +<!-- -->width: 144px; |
| 2478 | +<!-- -->height: 144px;<!-- |
| 2479 | + --></code></pre> |
| 2480 | + <th> |
| 2481 | + <pre><code>border-radius: 20px;</code></pre> |
| 2482 | + <th> |
| 2483 | + <pre><code>border-radius: 0;</code></pre> |
| 2484 | + <tr> |
| 2485 | + <th> |
| 2486 | + <pre><code><!-- |
| 2487 | + -->box-shadow: |
| 2488 | +<!-- --> rgba(0,0,0,0.4) |
| 2489 | +<!-- --> 10px 10px;<!-- |
| 2490 | + --></code></pre> |
| 2491 | + <td> |
| 2492 | + <img src="shadow-outer-round.png" width="175" height="175" |
| 2493 | + alt="A round-cornered box with a light gray shadow the same shape |
| 2494 | + as the border box offset 10px to the right and 10px down |
| 2495 | + from directly underneath the box."> |
| 2496 | + <td> |
| 2497 | + <img src="shadow-outer-square.png" width="175" height="175" |
| 2498 | + alt="A square-cornered box with a light gray shadow the same shape |
| 2499 | + as the border box offset 10px to the right and 10px down |
| 2500 | + from directly underneath the box."> |
| 2501 | + <tr> |
| 2502 | + <th> |
| 2503 | + <pre><code><!-- |
| 2504 | + -->box-shadow: |
| 2505 | +<!-- --> rgba(0,0,0,0.4) |
| 2506 | +<!-- --> 10px 10px |
| 2507 | +<!-- --> inset<!-- |
| 2508 | + --></code></pre> |
| 2509 | + <td> |
| 2510 | + <img src="shadow-inner-round.png" width="175" height="175" |
| 2511 | + alt="A round-cornered box with a light gray shadow the inverse shape |
| 2512 | + of the padding box filling 10px in from the top and left edges |
| 2513 | + (just inside the border)."> |
| 2514 | + <td> |
| 2515 | + <img src="shadow-inner-square.png" width="175" height="175" |
| 2516 | + alt="A square-cornered box with a light gray shadow the inverse shape |
| 2517 | + of the padding box filling 10px in from the top and left edges |
| 2518 | + (just inside the border)."> |
| 2519 | + <tr> |
| 2520 | + <th> |
| 2521 | + <pre><code><!-- |
| 2522 | + -->box-shadow: |
| 2523 | +<!-- --> rgba(0,0,0,0.4) |
| 2524 | +<!-- --> 10px 10px |
| 2525 | +<!-- --> 10px /* spread */<!-- |
| 2526 | + --></code></pre> |
| 2527 | + <td> |
| 2528 | + <img src="shadow-outer-spread-round.png" width="175" height="175" |
| 2529 | + alt="A round-cornered box with a light gray shadow the same shape |
| 2530 | + as the box but 20px taller and wider and offset so that the |
| 2531 | + top and left edges of the shadow are directly underneath the |
| 2532 | + top and left edges of the box."> |
| 2533 | + <td> |
| 2534 | + <img src="shadow-outer-spread-square.png" width="175" height="175" |
| 2535 | + alt="A square-cornered box with a light gray shadow the same shape |
| 2536 | + as the box but 20px taller and wider and offset so that the |
| 2537 | + top and left edges of the shadow are directly underneath the |
| 2538 | + top and left edges of the box."> |
| 2539 | + <tr> |
| 2540 | + <th> |
| 2541 | + <pre><code><!-- |
| 2542 | + -->box-shadow: |
| 2543 | +<!-- --> rgba(0,0,0,0.4) |
| 2544 | +<!-- --> 10px 10px |
| 2545 | +<!-- --> 10px /* spread */ |
| 2546 | +<!-- --> inset<!-- |
| 2547 | + --></code></pre> |
| 2548 | + <td> |
| 2549 | + <img src="shadow-inner-spread-round.png" width="175" height="175" |
| 2550 | + alt="A round-cornered box with a light gray shadow the inverse shape |
| 2551 | + of the box but 20px narrower and shorter filling 20px in from |
| 2552 | + the top and left edges (just inside the border)."> |
| 2553 | + <td> |
| 2554 | + <img src="shadow-inner-spread-square.png" width="175" height="175" |
| 2555 | + alt="A round-cornered box with a light gray shadow the inverse shape |
| 2556 | + of the box but 20px narrower and shorter filling 20px in from |
| 2557 | + the top and left edges (just inside the border)."> |
| 2558 | + </tr> |
| 2559 | +</table> |
2481 | 2560 |
|
2482 | 2561 |
|
2483 | 2562 | <h2>Definitions</h2> |
@@ -2684,7 +2763,8 @@ <h2>Acknowledgments</h2> |
2684 | 2763 | image(s) cannot be loaded. |
2685 | 2764 |
|
2686 | 2765 | <p>Finally, special thanks go to Brad Kemper for his feedback and |
2687 | | -suggestions for many of the features in the draft.</p> |
| 2766 | +suggestions for many of the features in the draft, and for drawing |
| 2767 | +all the box-shadow examples.</p> |
2688 | 2768 |
|
2689 | 2769 | <!-- |
2690 | 2770 | <p class=issue>Editor's Note: This list needs to be updated (or |
|
0 commit comments