Elective 1 Report
Elective 1 Report
The background-position CSS property sets the initial position for each background image.
The position is relative to the position layer set by background-origin.
<position>
A position defines an x/y coordinate, to place an item relative to the edges of an element's
box.
<length> or <percentage>
This specifies the X coordinate relative to the left edge, with the Y coordinate set to 50%.
Gradient background
CSS gradients let you display smooth transitions between two or more specified colors.
Two types of gradient:
1. Linear Gradients
To create a linear gradient you must define at least two color stops. Color stops are the colors
you want to render smooth transitions among. You can also set a starting point and a
direction (or an angle) along with the gradient effect.
2. Radial Gradients
A radial gradient is defined by its center.To create a radial gradient you must also define at
least two color stops.
Margins, padding and borders
In CSS, the term "box model" is used when talking about design and layout. The CSS box
model is essentially a box that wraps around every HTML element. It consists of: margins,
borders, padding, and the actual content.
Content - The content of the box, where text and images appear
Padding - Clears an area around the content. The padding is transparent
Border - A border that goes around the padding and content
Margin - Clears an area outside the border. The margin is transparent
References:
https://developer.mozilla.org/en-US/docs/Web/CSS/background-position
https://www.w3schools.com/css/css3_gradients_radial.asp
https://www.w3schools.com/css/css_boxmodel.asp