mirror of
https://github.com/microsoft/frontend-bootcamp.git
synced 2026-01-26 14:56:42 +08:00
Day 1: title formatting coherence, other edits
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
## CSS Demo
|
||||
# Step 1.2 - Introduction to CSS (Demo)
|
||||
|
||||
### CSS Properties
|
||||
## CSS properties
|
||||
|
||||
Now that we've gone over adding HTML tags to the page, let's cover adding styles to those tags. We can do quite a lot with styles! We can change:
|
||||
|
||||
@@ -15,7 +15,7 @@ Now that we've gone over adding HTML tags to the page, let's cover adding styles
|
||||
|
||||
CSS styles are always written in `property: value` pairs (like `background: blue;`) and terminated with a semicolon.
|
||||
|
||||
### Applying CSS to an HTML file
|
||||
## Applying CSS to an HTML file
|
||||
|
||||
CSS can be applied to HTML tags in three different ways.
|
||||
|
||||
@@ -25,7 +25,7 @@ CSS can be applied to HTML tags in three different ways.
|
||||
3. Through an external CSS file
|
||||
- `<link rel="stylesheet" href="./css-demo-finished.css" />`
|
||||
|
||||
### Targeting specific elements
|
||||
## Targeting specific elements
|
||||
|
||||
Inline styles are always applied directly to the element you place them on, but `<style>` tags and external CSS files need a way to match elements with their respective style sets. This is done with **[CSS selectors](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors)**. When selectors are combined with CSS styles, we call this a **ruleset**.
|
||||
|
||||
3
step1-02/exercise/README.md
Normal file
3
step1-02/exercise/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Step 1.2 - Introduction to CSS (Exercise)
|
||||
|
||||
See index.html from [npm start](http://localhost:8080/step1-02/exercise/) or the [live site](https://microsoft.github.io/frontend-bootcamp/step1-02/exercise/) for the exercise.
|
||||
@@ -10,22 +10,22 @@
|
||||
data-default-tab="html,result"
|
||||
>
|
||||
<pre data-lang="css">
|
||||
/* 1. */
|
||||
/* 1. */
|
||||
|
||||
/* 2. */
|
||||
/* 2. */
|
||||
|
||||
/* 3. */
|
||||
/* 3. */
|
||||
|
||||
/* 4. */
|
||||
|
||||
/* 5. */
|
||||
/* 5. */
|
||||
|
||||
/* 6. */
|
||||
/* 6. */
|
||||
|
||||
/* Bonus */
|
||||
</pre>
|
||||
<pre data-lang="html">
|
||||
<!-- Without changing the below markup apply the styles asked for in the markup. Do not apply styles that a tag doesn't ask for -->
|
||||
<!-- Without changing the HTML markup, apply the styles asked for in the markup. Do not apply styles that a tag doesn't ask for. -->
|
||||
|
||||
<section>
|
||||
<h2>1. Text Color: Red</h2>
|
||||
@@ -38,7 +38,7 @@
|
||||
</ul>
|
||||
<div class="myClass">4. Background Green</div>
|
||||
<div class="myClass otherClass">
|
||||
5. Background Green & Color White
|
||||
5. Background Green & Color White
|
||||
(Hint Qualified Selector)
|
||||
</div>
|
||||
<div id="myId" class="otherClass">6. Background Yellow</div>
|
||||
|
||||
Reference in New Issue
Block a user