CSS BACKGROUND-POSITION-X - CSS3 Examples

CSS BACKGROUND-POSITION-X

Written by jon on 8:30 AM
If a ‘background-image’ is specified, this property specifies the initial position on the X-axis of the background image specified in the browser window if it is not continuously tiled in the element’s rendering box. A minimum value for this property indicates the left side of the rendering box, and a maximum value is at the right side. The Y-axis component of the background position can be specified using the ‘background’, ‘background-position’ or ‘background-position-y’ properties.

Example
div.marked {
background-image: url(watermark.jpg);
background-position-x: center
}
Possible Values
Value Description
[Percentage] Percentage is in reference to the dimensions of the box of the current element. Value specifies the percentage on BOTH the image and the canvas and may be negative (eg: 20% indicates the reference point 20% from the left side of the image is to be located at 20% from the left side of the element's rendering box
[Length] Represents an absolute X-coordinate position for the image and may be negative. Standard Absolute or Relative Length Units may be used here
leftcenterright Keywords representing X-axis screen positions for image placement

Related Posts by Categories



Widget by John | Interviewghost
  1. 1 comments: Responses to “ CSS BACKGROUND-POSITION-X ”

  2. By trustno1 on January 29, 2019 at 1:19 AM

    html css background image styles to beginners
    Background image repeat anchor link hover

RECENT COMMENTS

SUBSCRIBE TO CSS3 EXAMPLES

 Subscribe to css3 Examples via RSS
Or, subscribe via email:
Find CSS3 Examples Entries :