Absolution26 / js_center_spider_DOM

JS Advanced task. Center the spider.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

  1. Replace <your_account> with your Github username in the link
  2. Follow this instructions
    • There are no tests for this task so use npm run lint command instead of npm test

Task: Center the spider

Preview

Your task: Center the spider using only JavaScript. Yes, it task can be easily done with pure CSS, but not now. Do it with JS.

You no need to write any styles or HTML code in this task. Change only main.js file.

Hints:

  • Field has wall class.
  • Spider image has spider class.
  • Use DOM element's properties for calculating spider position.

It's an expected result of your job: Result

About

JS Advanced task. Center the spider.

License:GNU General Public License v3.0


Languages

Language:JavaScript 57.2%Language:HTML 23.0%Language:SCSS 19.8%