IT. Expert System.

CSS

background-size


Property Description

The background-size property specifies the size of the background images.

This property has the following syntax:

background-size: auto|length|%|cover|contain|initial|inherit;

Property Values

Value Description
auto Specifies that the background-image contains the height and width
length Sets the height and width of the background image. The first value sets the width, the second value sets the height. If only one value is given, the second is set to "auto"
% Sets the height and width of the background image in percent of the parent element. The first value sets the width, the second value sets the height. If only one value is given, the second is set to "auto"
cover Scale the image to the smallest size such that both its width and its height can fit inside the content area
contain Scale the image to the largest size such that both its width and its height can fit inside the content area
initial Specifies that the value of the property should be set to the default value
inherit Specifies that the value of the property should be inherited from the parent element

Examples

This example shows how to size the background image:

div {
  background:url(img_flwr.gif);
  background-size:80px 60px;
  background-repeat:no-repeat;
}  

Browser Support

Chrome Firefox IE Safari Opera
4.0
1.0 -webkit-
4.0
3.6 -moz-
9.0 4.1
3.0 -webkit-
10.5
10.0 -o-

Miscellaneous Information

Inherited: No
Defined In: CSS3
Default Value: auto


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 1966 / . Delta: 0.02904 с