If you want an animation to play forwards first, then reverse on alternate cycles, which value of animation-direction would you use?

  • alternate
  • alternate-reverse
  • normal
  • reverse
To make an animation play forwards first and then reverse on alternate cycles, you would use the animation-direction property with the value alternate-reverse. This value causes the animation to run normally on odd iterations (forwards) and in reverse on even iterations.

The ::first-letter pseudo-element in CSS targets the ________ of a block-level element.

  • First character
  • First letter
  • First line
  • First word
The ::first-letter pseudo-element in CSS is used to target the first letter of a block-level element, such as a paragraph or a heading. It's commonly used for styling the initial letter of a text block, for decorative or typographic purposes.

Which of the following is NOT a unit for font-size in CSS?

  • cm
  • em
  • ex
  • px
In CSS, font-size can be specified in various units, including em, ex, px, and cm. However, 'cm' is not a common unit for font-size. It's typically used for specifying dimensions of other elements, like margins or padding.

Which extension is used for SCSS files?

  • .css
  • .scss
  • .html
  • .js
SCSS (Sassy CSS) files have the ".scss" extension. This extension is used to indicate that the file contains SCSS syntax, which is a more CSS-like syntax with additional features provided by SASS.

The pseudo-class :nth-of-type(2) in CSS targets the ________ of its type.

  • any element
  • first element
  • last element
  • second element
The pseudo-class :nth-of-type(2) in CSS targets the second element of its type. It allows you to select and style the second occurrence of an element type within its parent container. This is useful for creating specific styles for the second element, such as the second paragraph or the second list item.

What does the text-transform property do in CSS?

  • Adjusts the text's spacing
  • Alters the text's font size
  • Changes the text's color
  • Transforms the text into uppercase
The text-transform property in CSS is used to control the capitalization of text. Setting it to "uppercase" transforms the text to all uppercase letters, while "lowercase" makes it all lowercase.

Using media queries, you can apply styles conditionally based on the ______ of the device or browser window.

  • color
  • sound
  • temperature
  • width
Media queries in CSS allow you to conditionally apply styles based on the width (or dimensions) of the device or browser window. By specifying different rules for various screen sizes, you can create responsive designs that adapt to different viewing environments.

Which CSS property allows you to set a graphical element to be used as a mask against an element?

  • element-mask
  • mask-clip
  • mask-image
  • mask-layer
The CSS property that allows you to set a graphical element to be used as a mask against another element is mask-image. This property lets you specify an image or SVG as a mask, which defines the transparency of an element based on the mask's alpha channel. It's often used for creating complex visual effects and overlays.

In a React application, you are tasked with styling a button that changes its background color based on a prop passed to it. Which CSS-in-JS library would be ideal for this?

  • Styled-components
  • Bootstrap
  • Tailwind CSS
  • SCSS
Styled-components is a popular CSS-in-JS library for React. It allows you to define component styles directly in your JavaScript code and can easily style components based on props, making it ideal for dynamic styling based on prop values.

The cubic-bezier function for animation-timing-function takes in ______ arguments to define the curve.

  • 1
  • 2
  • 3
  • 4
The cubic-bezier function in CSS, used for defining custom timing functions for animations, takes in three arguments. These three arguments represent the control points of the cubic Bezier curve, allowing precise control over the animation's progress.