디자인
부트스트랩 캐러셀 background-size 속성 응용하기
텍스투박스
2015. 11. 5. 16:28
부트스트랩 캐러셀 background-size 속성 응용하기
/* 메인 Carousel의 전체 높이를 수정한다 */
header.carousel {
height: 30%;
}
header.carousel .item, header.carousel .item.active, header.carousel .carousel-inner {
height: 100%;
}
header.carousel .fill {
width: 100%;
height: 100%;
background-position: center;
background-size: auto 100%;
}
출처 : http://www.w3schools.com/cssref/css3_pr_background-size.asp
Value | Description | Play it |
---|---|---|
auto | Default value. The background-image contains its width and height | |
length | Sets the width and height 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" | |
percentage | Sets the width and height 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 background image to be as large as possible so that the background area is completely covered by the background image. Some parts of the background image may not be in view within the background positioning area | |
contain | Scale the image to the largest size such that both its width and its height can fit inside the content area | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
반응형