CSS - Pluralsight Flashcards

1
Q

Applying the following declaration fixes the position of an element relative to which of the following?

position: fixed;

A

The browser’s viewport.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which of the following selectors will target both of the ‘div’ elements below?

section + div
section > div
section div
section ~ div

A

section ~ div

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which of the following properties has a default value of ease and specifies how the speed during a transition will be calculated?

transition-duration
transition-property
transition-delay
transition-timing-function

A

transition-timing-function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What will be the final background color of the rectangle SVG element below?

‘rect x=”50” y=”100” width=”50px” height=”300px” fill=”red” style=”fill: blue; color: green;” ‘

Black
Green
Red
Blue

A

Blue

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which of the following is true regarding keyframe rules created with @keyframes?

@keyframes rules don’t cascade

@keyframes rule declarations qualified with !important are considered first priority

@keyframes in embedded stylesheets are ignored

@keyframes rules must be the first rules in a stylesheet

A

@keyframes rules don’t cascade

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which of the following is true regarding media queries containing comma-separated lists of expressions?

  1. Commas are not valid characters in a media query.
  2. Commas cannot be combined with logical operators like ‘not’, ‘and’, or ‘only.’
  3. Commas act like the logical operator ‘or’, meaning that if any of the media queries is true the styles will be applied.
  4. All conditions must evaluate to true in order for the styles to be applied.
A

Commas act like the logical operator ‘or’, meaning that if any of the media queries is true the styles will be applied.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which character is used in a general sibling selector?

Greater than (>)
Pound (#)
Tilde (~)
Plus sign (+)

A

Tilde (~)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the effect of using a negative number in a padding declaration? Example:
p {
padding-top: -10px;
}

Same as margin-top: -10px;
Same as padding-top: 10px;
Same as position: absolute; top: -10px;
Same as padding-top: 0px;

A

Same as padding-top: 0px;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Which selector is used to find anchor elements that have not been visited by the user?

a: clicked
a: active
a: hover
a: link

A

a:link

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Which option is true regarding the flexbox layout mode?

It completely replaces the outdated box model as of CSS3.

It changes all block-level elements to inline elements.

The display order of elements can be independent of their order in the HTML source code.

It gives the same result as floating all elements in a document.

A

The display order of elements can be independent of their order in the HTML source code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Which property/properties are supported for the ::first-line selector element?

The margin and padding properties
The transform property
The font properties
The display property
The font properties
A

The font properties

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Which of the following attributes specifies the location of an external stylesheet?

url
rel
href
src

A

href

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Which of the following is a common method for keeping a parent element from collapsing when it contains only floated children?

The floated childfix method
The floatfix method
The clearfix method
Setting its display property to block

A

The clearfix method

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Which is an example of an adjacent sibling selector? (соседний родственный селектор)

div p
h1 + p
p > span
h1 ~ h2

A

h1 + p

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which option specifies the number of times an animation should be played?

iteration-count
animation-count
iteration
animation-iteration-count

A

animation-iteration-count

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What does the :first-line pseudo-element select?

The first line of text in a block element

The first line of any element capable of containing inner HTML

The first line of text in a document

The first line of text in an inline element

A

The first line of text in a block element

17
Q

Which of the following is an example of a general descendant selector?

input[type=”text”]
div > p
ul li
h1, h2

18
Q

Based on the code below, which paragraph(s) will be red?

<div>
    <p>Paragraph 1.</p>
    <p>Paragraph 2.</p>
</div>
<p>Paragraph 3.</p>
<p>Paragraph 4.</p>

div ~ p {
color: red;
}

Paragraph 1
Paragraphs 3 and 4
Paragraphs 1 and 2
Paragraph 3

A

Paragraphs 3 and 4