In rgba
, the alpha channel is a value between 0
and 1
. A value of 0
means fully transparent, and 1
means fully opaque.
Example: rgba(1, 3, 4, alpha)
opacity
is a CSS property used to control the transparency of an element. It also accepts values between 0
(fully transparent) and 1
(fully opaque).
The position
property defines how an element is positioned in the document. It is powerful but can be confusing at first:
top
, left
, right
, or bottom
.CSS transitions allow smooth changes between property values over a specified duration.
transition: property duration timing-function delay;
The transform
property allows you to move, rotate, scale, and skew elements.
transform: rotate(angle);
transform: scale(x, y);
transform: translate(x, y);
transform: skew(x-angle, y-angle);
Defines the point of origin for the transformation (default is the center).
transform-origin: center;
You can combine multiple transformations in a single transform
property by separating them with spaces.
background-color
background-image: url("...")
background-size
background-position
background-attachment
background
– A shorthand for all the above properties. Note: background-size
must come after background-position
. You can also stack multiple backgrounds using a comma (,
).