1.3 CSS Background Properties Flashcards

1
Q

What is the CSS shorthand property background controlling?

A

Background is shorthand CSS property sets
all background style properties at once

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

What are 5 background properties?

C.O.I.R.S.

A
  1. color,
  2. origin,
  3. image,
  4. repeat
  5. method,size,
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Can a background color be just words?

A

Yes, you can set a background color to a color name.

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

Can you set a background to a hexadecimal color?

A

Yes

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

What is a hexadecimal color?

A

It’s a precise system for labeling colors based on letters and numbers.

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

Can a hexadecimal color have just 3 digits?

A

Yes

Just letters or just numbers

3 digits is shorthand for a color

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

Can you use RGB for color specification?

A

Yes

Red, green, blue (RGB) can be
used to specify background color.

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

What does the property background-image help you do?

A

It allows you to specify the URL of an
image to be used in the background.

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

What are the 8 background properties?

Background is shorthand

CCAPRIS O

A
  1. background-clip
  2. background-color
  3. background-attachment
  4. background-position
  5. background-repeat
  6. background-image
  7. background-size
  8. background-origin
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Can a background have a gradient?

A

Yes

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

What is a background image?

A

A background image uses a picture for the background.

Sets one or several background images for an element.

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

What does background repeat do?

A

Background repeat controls whether or not the image
is tiled and how it gets tiled both vertically and horizontally.

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

What does background position control?

A

Controls the background position of a background image.

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

What’s the default for background image position?

A

By default, a background image’s initial position is the top-left corner of the containing element.

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

What rules does background value of cover apply?

A

Cover tells the browser to make sure the image always covers the entire container, even if it has to stretch the image or cut a little bit off one of the edges.

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

How does the value of contain differ from that of cover?

A

Shows the entire image

Contain stays within the boundaries.

17
Q

How do you use the property of background size to set size?

3 ways

A

Sets the size of a background image.

Keyword Values

1 Syntax

2 Syntax

18
Q

What does background-repeat do?

A

Controls whether or not the image is tiled and how it gets tiled both vertically and horizontally.

19
Q

What direction do repeated background images take?

Property: background-repeat

A

The property of background-repeat moves along Y and X, where

repeat-y repeats the image vertically,

while repeat-x repeats the background image horizontally.

20
Q

What graphic formats does background-image accept?

A

The background-image property in CSS applies a graphic (e.g. PNG, SVG, JPG, GIF, WEBP).

21
Q

Does the property of background-image accept gradients too?

A

Yes

You can use background-image property to set a gradient to the background of an element.

22
Q

How do you specify the background image source?

A

Using a URL, you can specify the location of the image.

23
Q

Are background properties combined?

A

Yes, you can have multiple background properties working together to create the desired effect.