Category: 2. CSS Properties

  • CSS background-repeat Property

    The background-repeat property is used to define how the background image should be repeated. By its default value the background-repeat is repeated both horizontally and vertically. If the “repeat-x” value is set, the image will be repeated only horizontally. If the “repeat-y” value is set, the image will be repeated only vertically. There are two other values: “space” and…

  • CSS background-position-y Property

    The background-position-y property sets the vertical position for each background. One or more values can be specified separated by commas. Initial Value top Applies to All elements. Inherited No. Animatable No. Version CSS3 DOM Syntax object.style.backgroundPositionY = “bottom”; Syntax Example of the background-position-y property with the “top” value: Result Example of the background-position-y property with the “bottom” value: Example of the background-position-y property…

  • CSS background-position-x Property

    The background-position-x property sets the horizontal position for each background. One or more values can be specified separated by commas. By default, a background-image is positioned at the element’s top-left corner and repeated both horizontally and vertically. Initial Value left Applies to All elements. Inherited No. Animatable No. Version CSS3 DOM Syntax object.style.backgroundPositionX = “right”; Syntax Example of the background-position-x property:…

  • CSS background-position Property

    The CSS background-position property specifies the starting position of a background-image. If the default value is set, a background-position will be placed at the top-left corner of an element. And if you set the background to be repeated, it will be repeated both vertically and horizontally. Initial Value 0% 0% Applies to All elements. It also applies to ::first-letter and ::first-line. Inherited No.…

  • CSS background-origin Property

    The CSS background-origin property specifies the background positioning area of a background-image. The background-origin property is one of the CSS3 properties. If the background-attachment is “fixed”, background-origin property will be ignored and will not have an effect. Initial Value padding-box Applies to All elements. It also applies to ::first-letter and ::first-line. Inherited No. Animatable No. Version CSS3 DOM Syntax object.style.backgroundOrigin = “content-box”; Syntax Example of the background-origin property: Result…

  • CSS background-image Property

    The background-image property specifies background images for elements. There can be used one or more images. By default, a background-image is vertically and horizontally repeated and placed at the top-left corner of the element. The background of an element is the total size of it including padding and border (not margin). If the image is unavailable, you need to specify a background-color. Initial Value none…

  • CSS background-color Property

    CSS background-color property sets an element background color. The background of an element is the total size of it which includes padding and border (but not the margin). So, for setting a background color you need to choose any color. You can choose colors from our Color Picker tool. The color can be written like the following types: a color name – “red”,…

  • CSS background-clip Property

    CSS background-clip property specifies how far the background-color and background-image should be from the element. If the element has no background-image or background-color, this property will only have a visual effect when the border has transparent regions or partially opaque regions, otherwise, the border shows the difference. The background-clip property is one of the CSS3 properties. For clipping a background to a text there is also a…

  • CSS background-blend-mode Property

    The background-blend-mode is a CSS property which defines the blending of the background images with each other and with the background-color. It has 10 values: normal, multiply, screen, overlay, darken, lighten, color-dodge, saturation, color, luminosity. The default value is normal. If there are several background layers and they have a specified list of blend modes, background-blend-mode should be applied in the same…

  • CSS background-attachment Property

    The background-attachment property defines if the background-image is fixed or it will scroll along with the rest of the page. Background-attachment has three values: fixed, scroll and local. When the “scroll” value is set, the background-image will scroll with the page. This is the default value. When the “fixed” value is applied, the background-image will remain fixed to the viewport. Even if an element…