디자인

부트스트랩 캐러셀 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

ValueDescriptionPlay it
autoDefault value. The background-image contains its width and heightPlay it »
lengthSets 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"Play it »
percentageSets 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"Play it »
coverScale 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 areaPlay it »
containScale the image to the largest size such that both its width and its height can fit inside the content areaPlay it »
initialSets this property to its default value. Read about initialPlay it »
inheritInherits this property from its parent element. Read about inherit


반응형