Backgrounds Flashcards

1
Q

How to give Text or IMG transparent background in CSS?

A

Using background or background-color declaration you can give transparency to the element background.

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

CSS Background property

A

The background shorthand CSS property sets all background style properties at once, such as color, image, origin and size, or repeat method. Combine method by the comma. You can change opacity as well by just adding one more number to the color or img or gradient number.

background: no-repeat url(“../../media/examples/lizard.png”), content-box radial-gradient(#453, #234, #288, #984); (You can use as many as you need colors)
background: green;

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

Box Model CSS

A

When laying out a document, the browser’s rendering engine represents each element as a rectangular box according to the standard CSS basic box model. CSS determines the size, position, and properties (color, background, border size, etc.) of these boxes.

Every box is composed of four parts (or areas), defined by their respective edges: the content edge, padding edge, border edge, and margin edge.

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

How to Make a DIV Not Larger than its Contents using CSS?

A

You can simply use the CSS display property with the value inline-block to make a <div> not larger than its contents.</div>

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

justify-content

A

The CSS justify-content property defines how the browser distributes space between and around content items along the main-axis of a flex container, and the inline axis of a grid container.

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

flex-direction

A

The main axis in flexbox is defined by the direction set by the flex-direction property. There are four possible values for flex-direction. These are:

row
row-reverse
column
column-reverse

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

align-items

A

The CSS align-items property sets the align-self value on all direct children as a group. In Flexbox, it controls the alignment of items on the Cross Axis.

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

Cross Axis

A

The cross axis in flexbox runs perpendicular to the main axis, therefore if your flex-direction is either row or row-reverse then the cross axis runs down the columns.

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

How do I auto-resize an image to fit a ‘div’ container?

A

< img style=’height: 100%; width: 100%; object-fit: contain’/>

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