I wnat to know the information about the css background position. What are the different syntax use to define css background position. I also want some example which explain the declaration of css background position.
I wnat to know the information about the css background position. What are the different syntax use to define css background position. I also want some example which explain the declaration of css background position.
With CSS, you are able to set the background color or image of any CSS element. The background position property is an old css property that was conceived in a time when the web wasn't all that visual. You can have a background image repeat vertically (y-axis), horizontally (x-axis), in both directions, or in neither direction.
CSS background-position :
Code:body { background-image:url('s1.gif'); background-repeat:no-repeat; background-attachment:fixed; background-position:center; }
The background-position CSS property sets the initial position of any background image that has been set that means the background-position property sets the starting position of a background image. background-image: url(URL) e.g. url(images/im1.jpg) : Specifies an image to display in the background of the element.
For CSS properties, you usually translate them to Javascript by substituting "camel case" for CSS' dashes. Background-image is the property of CSS that inserts a background image. To add background image, you first have to have an image that you would like to appear on your page.
The background-position property defines the x and y (horizontal and vertical) position of the background image. Syntax:background-position: <value>.To make the image horizontally repeated, use the “repeat-x” value next to the property background-repeat then separate them with colon. The background-position property gives the initial position of a specified background image. This property may only be applied to block-level elements and replaced elements.
Bookmarks