Giter VIP home page Giter VIP logo

m1-2-htmlcss-css-basics's Introduction

1.2 - CSS: The Basics - Workshop

Unless specified in the exercise, don't worry about the fonts. Some of the screenshots were taken on Linux and the base system font is a little different.

Exercise 1

  • Open the provided index.html file in the browser.
  • Modify the style.css file to match the following image

exercise-1 goal

  • background color is blue
  • properties used: padding, border, background, color, border-radius.
    • HINT: you need to remove the default border.
  • Don't worry if your font looks different

Exercise 2

  • Open the provided index.html file in the browser.
  • Modify the style.css file to match the following image

exercise-2 goal

  • Colors used are pink and fuschia
  • text size is 5em for the last line.
  • Don't worry if your font looks different

Exercise 3

  • Open the provided index.html file in the browser.
  • Modify the style.css file to match the following image

exercise-3 goal

Properties you will likely need

font-size- done
font-style - done
font-family
text-align-
  • You will need to use the Comic Sans MS font-family

Exercise 4

The style.css file contains errors. Modify that file, and only that file, to produce the following output:

exercise-4 goal

Exercise 5

The style.css file has been corrupted. Repair the CSS so that the page matches the image below.

exercise-5 goal

No modifications to the HTML file.

Exercise 6

Add the CSS needed to reproduce this page.

exercise-6 goal

The exact measurements are not needed. Try and estimate the values (colors, font-sizes, etc).

Exercise 7

Complete both the HTML and CSS files to reproduce the following web page:

It isn't necessary to make it pixel perfect.

exercise-7 goal


๐ŸŸก - Minimally complete workshop (75%) - ๐ŸŸก

Exercise 8

Update the CSS file to reproduce the following:

exercise-8 goal

Properties Needed

display
visibility

Exercise 9

Update the CSS file to reproduce the following:

exercise-9 goal

  • The alpaca stays at the top left of the screen but must appear in front of the cat image
  • The cat is moved to the top left of the screen
  • The dog must be 50% away from the top and from the left of the screen and always stay there (even when scrolling down)
  • The whales must be moved to the bottom left of the screen

Properties Needed

z-index
top
left
position
bottom
right

๐ŸŸข - Complete workshop (100%) - ๐ŸŸข

Resources


Links to more practice

Additional Resources


Exercise 10 - Stretch

Using CSS, create a button that animates on hover:

stretch-1 goal

  • It should color to a dark-blue when focused. It should not have the typical "focus ring" (blue outline on MacOS, dotted outline on Windows).
  • It should shrink when the mouse is held down on it.
  • It should be animated

Necessary properties/techniques

  • You'll need the :active and :focus pseudoselectors
  • You'll also need to use the transform: scale property for the size change, and the transition property for the animation.
  • You can disable the outline with outline: none, but you should only do this if you have an alternative focus state. That outline is very important for keyboard users, to know which element is focused.

m1-2-htmlcss-css-basics's People

Contributors

scottanthonymorin avatar bharatkatyal avatar joshwcomeau avatar

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.