2013-11-26 33 views
0

如何讓我的一樣引導輪播圖片Comrpessed當屏幕小

http://graduateland.com/ 

我試着跟隨他們的CSS圖像的工作,我目前使用的引導3轉盤。

我當前的代碼

.carousel-inner > .item > img { 
position: absolute; 
top: 0; 
left: 0; 
min-width: 100%; 
height: 500px; 
} 

GraduateLand

[id="get-started"] { 
display: table; 
width: 100%; 
height: 100%; 
margin-top: 0; 
padding-bottom: 0; 
background-image: url("/newgl/gateway/gl/img/home-hero.jpg"); 
background-repeat: no-repeat; 
background-position: center center; 
background-size: 100%; 

id="get-started"] { 
background-size: auto; 
background-position: center top; 
} 

更新

element.style { 
background-size: cover; 
-webkit-background-size: cover; 
-moz-background-size: cover; 
-o-background-size: cover; 
background-size: cover; 
background-repeat: no-repeat; 
background-attachment: fixed; 
background-position: center; 
} 

回答

0

回答〜

position: absolute; 
top: 0px; 
left: 0px; 
width: 100%; 
height: 100%; 
background: #000 url('URLEREE) no-repeat; 
-moz-background-size: cover; 
background-size: cover; 
-webkit-background-size: cover; 
-o-background-size: cover; 
background-color: transparent; 
-1

用於示出在報頭全寬圖像:

<div class="header"> 

<div class="container"> 
<!-- put carousel here --> > 
</div> 

</div> 
+0

我不是在顯示完整圖像,興趣,但顯示圖像的一部分,當屏幕尺寸爲縮短。目前它看起來醜陋,當屏幕尺寸很小,因爲圖像是cmopressed – CodeGuru

+0

background-size:cover – mehrdxd

+0

我更新了問題..它必須在一個div或它可以在一個img元素 – CodeGuru