CSS More Properties Flashcards

1
Q

What is Alpha Channel

A

In RGB there is an “a (alpha channel)” which control transparency. 0 being completely transparent, and 1 being non transparent.
rgba (255,255,255,0.7)

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

Define Opacity

A

Opacity is a property set on an element which governs transparency for entire element. 0-1, 1 being non transparent.

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

How do you change transparency on hexadecimal colors

A

00-FF, ff being non transparent

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

List position properties

A
Sets how an element is positioned.
Static
Absolute 
Fixed 
Sticky
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Static Position

A

Static - default (top, right, bottom, left has no effect)

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

Relative Position

A

Relative - Allows TRBL to have effect relative to original position

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

Absolute Position

A

Absolute - Element is removed from document flow. TRBL effects position relative to closest ancestor

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

Fixed Position

A

Fixed - Element is removed from document flow. Similar to absolute but not relative to any ancestor position. Stays in place when scrolling. ie Nav Bar

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

Sticky Position

A

Sticky - Starts as static then behaves like fixed.

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

What are the four things we can specify in Transitions.

A
  1. Property we want to animate
  2. Duration set in seconds (ms)
  3. Transition-timing-function
  4. Delay (default no delay)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does transform do?

A

Transform can rotate, translate(move), scale(size), skew, etc.

transform: translateX(2em);
transform: skewY(45deg);

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

How do you combine transform properties. Rotated 90 degrees and half scale.

A

You can combine by a space.

transform:rotate(90deg) scale(0.5);

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

Transform - flip upside down, double the size, skew by 45 deg on X-axis and 25 deg on Y-axis, and shift it 300 pixels to the left.

A

transform:rotate(180deg) scale(2) skewX(45deg) skewY(25deg) translate(300px)

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

How do you add a Background image.

A

background-image: url(https://image.here.com);

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

What are common background sizing property options?

A

background-size: contain; (scale everything large as possible without cropping or stretching, but repeats.)
background-size: cover; (scale to largest without stretching but will crop.)
background-size: 30% (shrink to 30% of original.)
background-size: 200px 100px (x and y sizing.)

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

How to stop repeating background?

A

Background-repeat: no-repeat;

17
Q

How do you set position of background?

A

background-position: bottom;
background-position: top;
background-position: left;
background-position: right;

18
Q

What is shorthand for background property?

A

background: green no-repeat url(https://image.com) center/cover
* background size has to come after background position followed by a ‘/’. All other order does not matter.