CSS Flashcards

1
Q

CSS Comment Line

A

/* This is a CSS comment */

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

Create an id selector

A
#joeid {
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Create a class selector

A

.joeclass {

}

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

Background color

A

body {
background-color: #FFFFFF;
}

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

Background image

A

body {
background-image:url(‘image.jpg’);
}

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

Background image that repeats horizontally

A

body{
background-image: url(‘image.jpg’);
background-repeat: repeat-x;
}

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

Background image that repeats vertically

A

body {
background-image:url(‘image.jpg’);
background-repeat: repeat-y;
}

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

Background image in a set position(upper right corner) that doesn’t repeat

A
body {
background-image: url('image.jpg';
background-repeat: no-repeat;
background-position: right top;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

background-position properties

A
left top;
left center;
left bottom;
right top;
right center;
right bottom;
center top;
center center;
center bottom;
%x %y; (top left = 0% 0%, bottom right = 100% 100%)
xpos ypos;(top left 0px, 0px)
inherit; - Specifies that the setting of the background-position property should be inherited from the parent element.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

background-repeat properties

A

repeat; - repeats horizontally and vertically(default)
repeat-x; - repeats horizontally
repeat-y; - repeats vertically
no-repeat; - does not repeat
inherit; - Specifies the setting of the background-repeat property should be inherited from the parent element.

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

background-clip properties

A

border-box - The background is clipped to the border box.
content-box - The background is clipped to the content box.
padding-box - The background is clipped to the padding box.

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

background-origin properties

A

border-box - The image is positioned relative to the border box.
content-box - The image is positioned relative to the content box.
padding-box - The image is positioned relative to the padding box.

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

background-image properties

A

length - Sets the width and height of the background image. The first value sets the width, the second value sets the height. If only one value is given, the second is set to “auto”.
percentage - Sets the width and height of the background image in percent of the parent element. The first value sets the width, the second value sets the height. If only one value is given, the second is set to “auto”.
cover - Scale the background image to be as large as possible so that the background area is completely covered by the background image. Some parts of the background image may not be in view within the background positioning area.
contain - Scale the image to the largest size such that both its width and its height can fit inside the content area.

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

What is the CSS Box Model?

A

Margins –> Border –> Padding –> Content

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