HTML Academy
Shadow Art - 2
Shadow Play16/17
Back to the list of tasks
  • 1. The box-shadow Property
  • 2. Horizontal Shadow Offset
  • 3. Vertical Shadow Offset
  • 4. Shadow Feathering
  • 5. Stretching the Shadow
  • 6. Feathering + Stretch
  • 7. Shadow Color
  • 8. Inner Shadow
  • 9. Challenge: Dim Shadows
  • 10. Semi-Transparent Shadow
  • 11. Casting a Shadow Only from One Side
  • 12. Multiple Shadows
  • 13. Multiple Borders for One Element
  • 14. Shadow Art – 1
  • 15. Shadow Art - 2
  • 16. Shadow Art - 3
  • 17. Challenge: The Foreboding Shadows
Challenge: The Foreboding Shadows
  • Sign up
  • Log in

Loading…
Everything will be ready in few seconds

  • Theory
  • Theory
  • Comments

Shadow Art - 3

The preparations for creating our image are complete.

We have a class that creates a beautiful ring using shadows. Elements and styles have also been added to the source code to position the rings the way we want.

All you need to do is to add a class to the four elements to get the picture. Recall that you can assign several classes to an element by separating them with a space:

<div class="one two">

Comments

  • index.html
  • style.css
HTML
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Shadow Art – 3</title> <link rel="stylesheet" href="style.css"> </head> <body> <div class="logo"> <div class="c1"></div> <div class="c2"></div> <div class="c3"></div> <div class="c4"></div> </div> </body> </html>
CSS
body { padding: 20px; background-color: white; } .logo { margin: 50px auto; width: 280px; } .logo div { position: absolute; } .logo .c1 { margin-left: 0; } .logo .c2 { margin-left: 60px; } .logo .c3 { margin-left: 120px; } .logo .c4 { margin-left: 180px; } .circle { margin: 10px auto; width: 100px; height: 100px; border-radius: 50%; box-shadow: inset 2px 2px 2px 0 white, inset 0 0 0 4px #4f5054, inset 0 0 0 5px black, inset -5px -5px 5px 3px white, inset 0 0 0 9px #6c6d70, inset 0 0 0 10px black; }

What didn’t you like in this task?

Thanks! We’ll fix everything at once!

The code has changed, click “Refresh” or turn autorun on.

You’ve gone to a different page

Click inside the mini-browser to shift the focus onto this window.

100%
Goalscompleted
0

    Add the circle class to the elements with the following classes:

    1. c1,
    2. c2,
    3. c3,
    4. c4.

    Cookies ∙ Privacy ∙ License Agreement ∙ About ∙ Contacts ∙ © HTML Academy OÜ, 2019−2025

    VISAMastercard

    Log in

    or

    Forgot your password?

    Sign up

    Sign up

    or
    Log in

    Restore access

    Have you forgotten your password or lost access to your profile? Enter your email connected to your profile and we will send you a link to restore access.

    Forgot to connect your email to the profile? Email us and we’ll help.