Background-size can set the size of the background picture, the value includes length and percent percentage. It also sets the extent of its image overlay based on the background Origin location Background-origin. So let's take a
background-sizeYou can set the size of the background picture, and the value includes length and percent percentage. background-originIt also sets the extent of its image coverage based on the background Origin location. So let's take a look at this
Originally, we can only change the position and repetition of the background image, but cannot change the size as if we changed the label image. In css3, the image size of the background can be changed.
Sample Code: Background-size
Sets the size of the background picture to be displayed as a length or percentage , and to scale the picture through cover and contain .
Grammar:
Background-size:auto |
Value Description:
1, Auto: Default value, do not change the original height and width of the background picture;
2, : paired appearance such as 200p
Background-size: cover and-webkit-background-size,
When using jade and styl to write a mobile phone page and the element is a background image, background-size cover is often used, whi
Background-sizeSets the size of the background picture to be displayed as a length or percentage , and to scale the picture through cover and contain .Grammar:Background-size:auto | Value Description:1, Auto: Default value, do not change the original height and width of the background picture;2, : paired appearance suc
Using pure CSS3 to realize the grid background, what should be done?You need to set the Background-image,background-size property to the container. Container { background-image:Linear-gradient (RGBA (0, 0, 0.15) 10%, Rgba (0, 0, 0, 0) 10%);
Background images/textures are used in a variety of ways and are often used to add the best final landscaping to the site. Now it is valued in the CSS3, we can apply the background image and background picture size to achieve more perfect effect.
CSS3 background picture
Background-size attribute in css, cssbackground-sizeValue Type of background-size: one or two values, which can be pixel px, percentage %, auto, or specific value cover or contain.Background-size can be set to 2 values. One value is required and the other value is optional.1
The size of the CSS background image does not change with the browser scaling. the css background image
The size of the background image on the homepage of some websites does not change with the browser scaling. For example, the size
background-sizeYou can set the size of the background picture, and the value includes length and percent percentage. background-originIt also sets the extent of its image coverage based on the background Origin location. So let's take a look at this
Solve the problem that some versions of IE do not support the background-size attribute, iebackground-size
Background-size is a new property of CSS3. Many browsers now support CSS3. However, some versions of the IE browser are not supported, such as IE8 and IE9. Some CSS 3 a
Transferred from: http://www.igooda.cn/jsdt/20130827355.htmlBackground-size requires two values, which can be either pixels (px), percent (%), or auto, or cover and contain. The first value is the width of the background graph, and the other value specifies the height on the background graph, and if only 1 values are set, the 2nd default is auto, except when the
Details on background-size usage and background usage
Detailed description of background-size attribute usage:This attribute is used to control the size of the background image. The cod
When using jade and styl to write a phone page, and the element is a background image, it is often used to background-size cover, which means that the background image is covered with the entire element, and to ensure that the background image aspect ratio.That is, when the
background-size This background property should all be used in mobile development, and there will be a very good feeling. Today, backstage suddenly came to me that all the background pictures on the page can not be displayed. Quickly pick up the phone, open the native browser opened a look, sure enough ... All
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.