1. In order to make color changes to menu color blocks in response to mouse actions, you have to assign a special class to the ___ elements.
That's correct. Well done!
The correct answer:
li
Press Tab or click button to advance to next exercise.
2. In this code, type the line that you delete when you're going to create a special class that changes menu item colors.
div#navbar ul li {
background-color: blue;
text-align: center;
display: inline;
width: 19%;
float: left;
margin-right: .5em;
}
That's correct. Well done!
The correct code:
background-color: blue;
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
3. This code changes the color of the menu item color block when the user _____.
li.changeBackground:active {
background-color: darkBlue;
That's correct. Well done!
The correct answer:
clicks
Press Tab or click button to advance to next exercise.
4. Fill in the blank for the styling for items of the class "nav" that applies before the user mouses over the menu item.
li_____ {
background-color: orange;
}
That's correct. Well done!
The correct code:
.nav
Press Tab or click button to advance to next exercise.
5. Drag-and-drop: Holding down the left mouse button, drag the pieces of code onto the screen to style the element when the user mouses over it.
6. Click in the box and type the next character. I'll autocomplete. Don't type spaces or carriage returns. When the exercise is complete, I'll turn the exercise number green.
Code the first line that changes the color of the color block when the user clicks it. The class is "colorChanges".
That's correct. Well done!
Press Tab or click button to advance to next exercise.
7. Fail-safe coding. If you type the wrong character, I'll cancel the keystroke. Type spaces. When the exercise is complete, I'll turn the exercise number green.
Code the line that changes the color of a color block to black. Don't indent.
Press Tab or click button to advance to next exercise.
That's correct. Well done!
8. Code the first line that changes the color when the user mouses over it. The class is "dynamic".
That's correct. Well done!
The correct code:
li.dynamic:hover {
Press Tab or click button to advance to next exercise.
9. Code the first line that styles the color block before the user does anything. Make up the class name.
That's correct. Well done!
Example:
li.menuItem {
Press Tab or click button to advance to next exercise.
10. Code the first line that changes the color when the user clicks on the item. Make up what you need to.
That's correct. Well done!
Example:
li.special:active {
Press Tab or click button to advance to next exercise.
11. Code three lines that style a color block orange before the user does anything. Make up what you need to.
That's correct. Well done!
Example:
li.navBlock {
background-color: orange;
}
Press Tab or click button to advance to next exercise.
12. Code three lines that style a color block a hex color when the user clicks it. Make up what you need to.
That's correct. Well done!
Example:
li.navBlock:active {
background-color: #0c0c0c;
}
Press Tab or click button to advance to next exercise.
The next several exercises are timed. If you type slowly or dislike time pressure, feel free to increase the allotted time.
13. Time goal: 25 seconds. Code the line that changes the color of a color block to black. Don't indent.
Press Tab or click button to check answer.
The correct code:
background-color: black;
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
14. Time goal: 20 seconds. Code the first line that changes the color when the user mouses over it. The class is "dynamic".
Press Tab or click button to check answer.
The correct code:
li.dynamic:hover {
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
15. Time goal: 20 seconds. Code the first line that styles the color block before the user does anything. Make up the class name.
Press Tab or click button to check answer.
Example:
li.menuItem {
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
16. Time goal: 20 seconds. Code the first line that changes the color when the user clicks on the item. Make up what you need to.
Press Tab or click button to check answer.
Example:
li.special:active {
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
17. Time goal: 50 seconds. Code three lines that style a color block orange before the user does anything. Make up what you need to.
Press Tab or click button to check answer.
Example:
li.navBlock {
background-color: orange;
}
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
18. Time goal: 55 seconds. Code three lines that style a color block a hex color when the user clicks it. Make up what you need to.
Press Tab or click button to check answer.
Example:
li.navBlock:active {
background-color: #0c0c0c;
}
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
19. Access this live coding exercise at JS Fiddle. When you've completed the exercise, close the JS Fiddle window, and you'll be returned to this page. (If JS Fiddle displays a warning message saying that your changes will be reset, click Leave this Page.)
Click button to advance.
20. Access this live coding exercise at JS Fiddle. When you've completed the exercise, close the JS Fiddle window, and you'll be returned to this page. (If JS Fiddle displays a warning message saying that your changes will be reset, click Leave this Page.)
Click button to advance.
Post a review on Amazon for the paperback or the Kindle edition.
Email me to give me a compliment, complaint, or correction. I'll respond.
0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19
1
0