Unlock access to all the studying documents.
View Full Document
Unit K Creating Visual Effects and Animation
1. The :before and :after pseudo-elements enable you to insert content into web pages using style rules.
2. You can use the :before pseudo-element to add an image before an element.
3. Style rules based on the :before and :after pseudo classes use the display property to specify text or the path
and name of a file.
4. In the box model, generated content is not considered part of an element’s content.
5. CSS supports several pseudo-classes specifically for use with forms.
6. You can use the :visited pseudo-class to change the properties of input elements and other elements in forms.
Unit K Creating Visual Effects and Animation
7. You use the :focus pseudo-class to specify styles for a form field when it has the focus.
8. The :valid pseudo-class applies to form elements with user input that does not meet the rules for the field.
9. Modern browsers support gradients as backgrounds.
10. You can create triangles by applying CSS properties to div elements.
11. Modernizr tests a browser to detect which properties are supported, a process known as browser detection.
_________________________
12. Modern browsers support using the CSS transform property to apply a transform. _________________________
13. Browser suffixes are words or abbreviations that are added to a property name and that are specific to one or more
browsers or rendering engines. _________________________
Unit K Creating Visual Effects and Animation
14. A filter is a visual effect in which an area starts as a single color on one edge or corner and transitions gradually to one
or more other colors. _________________________
15. The scale keyword rotates an element a specified number of degrees. _________________________
16. The translate keyword repositions an element a specified amount from its default position.
_________________________
17. To create a transition, the shorthand transform property or one or more of the specific properties for transitions is
added to the style rule for the default state of the affected element. _________________________
18. An animation created using animation properties and the @keyframes rule is known as a keyframe animation.
_________________________
19. Within the braces for an @keyframes rule, you specify nested rules using pixels as selectors.
_________________________
20. The animation-duration property specifies the time in seconds from the start of an animation to the end of the
animation. _________________________
Unit K Creating Visual Effects and Animation
21. Content added using the :before and :after pseudo-elements is known as __________ content.
22. Which property is used with the :before and :after pseudo-elements to specify either text or the path and name
for an image file to be displayed?
23. When specifying content for the :before and :after pseudo-elements, a pair of quotes with not content creates an
empty string, which you use to __________.
remove any content created in other style rules
specify a space as the content
specify a single quote as the content
specify a pair of quotes as the content
24. Which of the following is a pseudo-class that you can use with a form?
25. You use the __________ pseudo-class to apply styles to elements that are checked or otherwise selected.
26. You use the __________ pseudo-class to apply styles to elements that do not have the required attribute.
27. Which keyword do you use to create a basic background gradient?
28. You specify a gradient as the value of which property?
29. Unless you specify otherwise, a linear gradient starts at the __________ of an element.
30. The __________ keyword prevents a gradient from repeating.
31. When creating a gradient, a color name or value followed by a measurement is known as a(n) __________.
32. Which property is important in creating a circle with CSS?
1
299
Unit K Creating Visual Effects and Animation
33. A design exhibits __________ when it uses newer styles in modern browsers while displaying a usable layout and all
page content in older browsers.
34. Which of the following script libraries is a popular tool for implementing graceful degradation?
35. The process of testing a browser to detect which properties are supported is known as __________.
36. Modernizr applies a set of CSS classes to which element?
37. When you use Modernizr, you can write style rules that apply only to children of elements with specific __________
values.
38. A change in the appearance of an element in one or more specific ways, including rotating, scaling, skewing, or
moving it, is known as a(n) __________.
39. Which of the following is the browser prefix for Microsoft browsers?
40. CSS features that gradually apply changes to properties in response to user actions over a number of seconds are
known as __________.
41. An animation created using animation properties and the @keyframes rule is known as a(n) __________.
42. Which property specifies the time in seconds from the start of an animation to the end of the animation?
animation–iteration–count
43. Which property determines the rhythm of a transition?
transition–timing–function
44. To create an @keyframes rule, you specify a(n) __________ for the rule after the keyword @keyframes.
306
Unit K Creating Visual Effects and Animation
45. Referring to the figure above, what does the code 45deg specify?
the starting point and direction
46. Referring to the figure above, what does the code #d823c5 specify?
the starting point and direction
47. Referring to the figure above, what does the code #edd010 specify?
the starting point and direction
48. Referring to the figure above, the property name –ms–transform incorporates a(n) __________.
49. Referring to the figure above, what is the effect of the value scale(1.2)?
rotates the element 1.2 degrees
resizes the element 1.2 times its original size
Unit K Creating Visual Effects and Animation
moves opposite sides in opposite directions to create an angle of 1.2 degrees
repositions the element 1.2em from its default position horizontally and vertically
50. Referring to the figure above, when are the declarations applied to the elements selected by the style rule?
when the web page is first rendered by the browser
when a user moves the mouse pointer over the elements
when a user clicks the elements
when the elements have valid content
51. Referring to the figure above, what does the code reveal-sun represent?
the class value of the element to which the code applies
the name of the keyframe animation
the text that is animated
the title of the animation
52. Referring to the figure above, what does the code 50% represent?
the point in time halfway through the animation
the point in time when the animated object has moved halfway across the browser window
the point in time when the animated object has moved halfway across the parent element
the location halfway down the browser window
Case-Based Critical Thinking Question
Rosa is implementing a new layout for her jewelry store website by incorporating visual effects using CSS. In particular,
she is adding generated content and visual form feedback.
53. For elements that should not have generated content, Rosa can use the content property with a value of
__________.
” “ (quotes containing a space)
54. To specify properties for a form field with content that meets the rules for the field, Rosa should use the __________
pseudo-class.
55. To specify properties for the form field that has the focus, Rosa should use the __________ pseudo-class.
Case-Based Critical Thinking Question
Jerry is in charge of the website for a travel company. He wants to incorporate animation into the website so that when a
user moves the mouse pointer over an image, the image gradually increases in size.
56. Jerry could use a keyframe animation to create the effect, or he could use a(n) __________.
310-311
Unit K Creating Visual Effects and Animation
57. Which pseudo-class would Jerry use to specify the styles for the new visual effect?
58. If Jerry created his visual effect using a keyframe animation, which property would he use to specify how long the
animation takes?
animation–iteration–count
animation–timing–function
59. You can add generated content using the :before and __________ pseudo-elements.
60. You can use pseudo-classes to change the properties of input elements and other elements in __________ in
response to user actions.
61. When you click a form field, it has the focus and the declarations in a style rule using the __________ pseudo-class
are applied.
62. You can specify a gradient as a value of the background-image property or use the shorthand __________
property.
63. The __________ keyword prevents a gradient from repeating.
Unit K Creating Visual Effects and Animation
64. You can create a perfect circle using CSS by specifying a border radius of __________%.
65. Because the transform property is a relatively new CSS feature, it was implemented in some browsers with browser
__________, which are words or abbreviations that are added to the start of a property name.
66. __________ animations enable you to control more aspects of an animation than transitions.
67. Because the @-webkit-keyframes rule and the :valid pseudo-class are not part of the CSS specification, they
cause __________ errors.
Match each pseudo-class with the appropriate description.
68. the element is in the process of being clicked or otherwise activated
69. the element has the focus
Unit K Creating Visual Effects and Animation
70. the content entered by a user meets the rules for the field
71. user entry in the field is required
72. the element is checked or otherwise selected
73. Describe how to create a circle using CSS, including 3 properties required to do so and their values.
74. Explain the difference between transitions and keyframe animations, including at least one advantage of each.
75. Name the two parts of the syntax for creating a linear gradient, and describe the role of each part.