HTML Academy
Connector: move the second anchor
Anchor Positioning #36/14
Back to the list of tasks
  • 1. Start of the connector
  • 2. Connection to the second anchor
  • 3. End of the connector
  • 4. Connector: move the first anchor
  • 5. Connector: move the second anchor
  • 6. Draw the route
  • 7. Ship on the route
  • 8. Chain: move the first anchor
  • 9. Chain: move the second anchor
  • 10. Start of the second connector
  • 11. End of the second connector
  • 12. Ship on the second route
  • 13. Chain: move two anchors
  • 14. Move the anchor and switch routes
Ship on the route
  • Sign up
  • Log in

Loading…
Everything will be ready in a few seconds.

  • Challenge

Draw the route

Recreate the target with code
DifficultyEasy
CategoryHTML/CSS
Current
Your current page
Target
The result to match
ResultAppears after the first checkAppears after checking
  • index.html
  • style.css
HTML
CSS
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Connections between anchors</title> <link rel="stylesheet" href="setting.css"> <link rel="stylesheet" href="local-6.css"> <link rel="stylesheet" href="style.css"> </head> <body> <main class="stage"> <div class="work-field"> <div class="anchor anchor--one"></div> <div class="anchor anchor--two"></div> <div class="route route--bg route--one"></div> </div> <div class="parts-field"> <div class="parts-field-cell"> <div class="ship ship--one"></div> </div> </div> </main> </body> </html>
.anchor--one { anchor-name: --a1; } .anchor--two { anchor-name: --a2; } .route--one { position: absolute; left: anchor(--a1 right); right: anchor(--a2 left); top: anchor(--a1 center); bottom: anchor(--a2 center); } .route--bg { background-image: {{backgroundImage}}; background-repeat: no-repeat; background-position: {{backgroundPosition}}; background-size: {{backgroundSize}}; }
-3
Preview

The code has changed. Click “Reload” or turn on autorun.

You have left the challenge page.

Click inside the preview to focus this window.

100%
0
    Completed 0%.

    Challenge completed

    Extra moves
    Continue

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

    VISAMastercard

    We are using cookies to gather information which will help you use our website most effectively. You can read about this here or disable this feature if you want. By continuing to browse the site, you agree to our use of cookies.