Code Monkey home page Code Monkey logo

animal-save-lab's Introduction

Animal Save!

Learning Goals

  • Practice writing media queries.
  • Practice using absolute positioning.
  • Practice testing responsive design.

Introduction

Four adorable animals are in danger and only we, with our knowledge of media queries, absolute positioning and responsive design techniques, can save them.

In this lab, we will be creating media queries to place our animals in the browser window. Media queries are CSS rules that conditionally apply styles for different screen sizes. Used with the CSS positioning values, we can style our pages to deliver a consistent experience across devices โ€” and, in this case, make sure that no matter the size of the browser window, our animals stay out of trouble.

Instructions

  1. Open the index.html in the browser to navigate to different animal pages to see which ones you can rescue. Click on any individual animal to see the dangers they face. Once you are looking at a particular animals page, clicking and dragging on the corner of the browser and resizing the window you will see where the animal runs into trouble.
  2. Take advantage of media queries using max-width for desktop down and min-width for mobile up designs. Also utilize positioning: absolute, as well as properties such as top:, left:, right: ,bottom: to set the animals' positioning. You can also use CSS transform: rotate() if you wish to turn the animals. A single media query should be used to solve each page.
  3. Write the media queries necessary in the CSS files for each corresponding animal:
  • For the bear, when sizing the browser from smaller to larger (mobile up), when the screen reaches 1196px stop him from falling off the cliff by setting him to stay 800px from the left side of the screen before he reaches the edge.
  • For the ostrich, starting with the screen larger and dragging it smaller (desktop down) have the ostrich jump upwards 100px closer to the top of the screen to avoid being eaten by the alligator. As the screen gets smaller then he will run on top of Mr. Alligator's back.
  • For the monkey, use a combination of min-width and max-width to set a media query that will allow the monkey to jump up over the Spice Girls from screen size of 406px to 1170px keeping him safe from their affection.
  • For the dolphin, using min-width and max-width help her rotate and jump up through the hoop from screen sizes of 642px to 1090px. Note: you can use transform: rotate() command to accomplish this. Read about the setting for rotate here at Mozilla Developer Network.

There is a finished working copy of this site here.

Conclusion

With media queries, web developers can make sure content will be displayed how it's meant be seen across a range of devices and screens and provide a consistent, effective user experience.

Resources

animal-save-lab's People

Contributors

alveem avatar annjohn avatar bjacooper avatar fislabstest avatar fs-lms-test-bot avatar jongrover avatar lizbur10 avatar loganhasson avatar maxwellbenton avatar pletcher avatar sgharms avatar victhevenot avatar wsaxe avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

animal-save-lab's Issues

Empty & then solved with learn test

:C unfortunately just like the previous lab when i first opened this lesson with learn open the directory was empty so i did git pull and it solved the issue and downloaded files for me, then when i ran learn test it game me passed without changing any code or doing any work.

How to submit

I download the repo to work with my local IDE (VS Code)
and I complete the lap, How can I submit the result?
I mean in the browser IDE you type (learn and learn submit) command to check you code
but how can I do that in my vs code?

Tests

There are no tests, you are able to just run learn and pass everything. It doesn't make it challenging and it doesn't help if I get the answer wrong how would I know? Just a thought! Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.