我有一個幻燈片(jQuery循環),我用於網站的背景。問題是我想要對齊右側的照片,並且他們有不同的暗淡度,出於某種原因,寬度最小的人不會對齊到正確的位置......我試圖將img像人一樣放入div中在互聯網上建議和不同的事情,但無濟於事。這可能沒有編輯插件?jQuery Cycle - 在右側對齊不同尺寸的圖像?
HTML:
<p class="slideshow">
<img src="31.jpg" alt="" />
<img src="35.jpg" alt="" />
<img src="36.jpg" alt="" />
</p>
CSS:
p.slideshow {
position:absolute;
top:0;
right:0;
z-index:-999;
overflow:hidden;
background: url(images/stripe-bg.png) repeat;
margin:0;
padding:0;
/* without setting the width and height 100% I get the
annoying scroll bar on the right if photos are big in height */
/*height:100%;
width:100%;*/
}
你有任何線索如何個個右對齊?
謝謝, 克里斯
這是一個很酷的解決方案。謝謝!如果我想垂直對齊不同尺寸的幻燈片圖像,我只會在「margin:0 auto」的情況下使用相同的解決方案,對吧? – Cris
爲什麼添加額外的jQuery來處理客戶端,當你可以用css來做呢? – squarecandy