CSS Background Image Positioning

Source: Internet
Author: User

CSS Background Image Positioning
To locate the background image, you need to use the background style in CSS, such as: copy the code div {background-image: url ("1234.png"); background-repeat: no-repeat; background-position: 0px-100px;} copy the code property explanation: background-image: none | url (url) none: default value. No background image url (url): Specifies the background image background-repeat: repeat | no-repeat | repeat-x | repeat-y repeat: default value using an absolute or relative url address. No-repeat: the background image is not tiled repeat-x: the background image is tiled only horizontally. repeat-y: the background image is tiled only vertically. The background-position: length | lengthbackground-position: position | position length: Percentage | length value composed of floating point numbers and unit identifiers. Position: top | center | bottom | left | center | right background-position attribute description: the background-image attribute must be specified first. The default value is 0% 0%. The upper left corner of the background image is located in the upper left corner of the container. If only one value is specified, the value is used for abscissa. The default ordinate value is 50%. If two values are specified, the second value is used for ordinate. There are three ways to locate the image position: percentage, pixel value, and alignment. 1. Alignment Methods include top, botton, lef, right, and center values, which correspond to top alignment, bottom alignment, left alignment, and right alignment respectively, center alignment (alignment means that one side of the container overlaps the corresponding side of the image) clip_image002 contains three different style buttons. We can change the style when you click and double-click the button, code: copy the Code

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.