css缩略图修改 50
前者是现在的尺寸,后者是我想修改成的尺寸。<divclass="thumb"><aclass="clip-link"data-id="498"title="【09dota...
前者是现在的尺寸,后者是我想修改成的尺寸。
<div class="thumb">
<a class="clip-link" data-id="498" title="【09dota提高班】多变的收割机痛苦女王(qop)第一视角" href="###">
<span class="clip">
<img src="###.jpg" alt="【09dota提高班】多变的收割机痛苦女王(qop)第一视角" /><span class="vertical-align"></span>
</span>
<span class="overlay"></span>
</a>
</div>
/* Absolute Center(Vertical & Horizontal) Image */.thumb { position:relative; background:#000; overflow:hidden; vertical-align:bottom; _line-height:0; display:inline-block;}.thumb .clip-link { position:absolute; _position:static; bottom:-100px; top:-100px; left:-100px; right:-100px; text-align:center; white-space:nowrap; word-break:normal;}.thumb .clip { position:absolute; top:0; left:0; width:100%; height:100%;}.thumb .clip img,.thumb .vertical-align { display:inline-block; vertical-align:middle;}.thumb .clip .vertical-align { height:100%;}/* Basic Overlay style */.thumb .overlay { position:absolute; border:0; top:0; left:0; width:100%; height:100%; background-color:rgba(0,0,0,0.5); background-image:url(images/icon-plus-24.png); background-repeat:no-repeat; background-position:center center; opacity:0; -webkit-transition:.25s; -moz-transition:.25s; -ms-transition:.25s; -o-transition:.25s; transition:.25s;}.thumb:hover .overlay { cursor:pointer; z-index:999; opacity:1;}.ie .thumb .overlay{visibility:hidden;}.ie .thumb:hover .overlay{visibility:visible;}.item-video .thumb .overlay{ background-image:url(images/icon-play-24.png);}.thumb img{width:100%;}
就是把原来的缩略图的宽度变成高度, 展开
<div class="thumb">
<a class="clip-link" data-id="498" title="【09dota提高班】多变的收割机痛苦女王(qop)第一视角" href="###">
<span class="clip">
<img src="###.jpg" alt="【09dota提高班】多变的收割机痛苦女王(qop)第一视角" /><span class="vertical-align"></span>
</span>
<span class="overlay"></span>
</a>
</div>
/* Absolute Center(Vertical & Horizontal) Image */.thumb { position:relative; background:#000; overflow:hidden; vertical-align:bottom; _line-height:0; display:inline-block;}.thumb .clip-link { position:absolute; _position:static; bottom:-100px; top:-100px; left:-100px; right:-100px; text-align:center; white-space:nowrap; word-break:normal;}.thumb .clip { position:absolute; top:0; left:0; width:100%; height:100%;}.thumb .clip img,.thumb .vertical-align { display:inline-block; vertical-align:middle;}.thumb .clip .vertical-align { height:100%;}/* Basic Overlay style */.thumb .overlay { position:absolute; border:0; top:0; left:0; width:100%; height:100%; background-color:rgba(0,0,0,0.5); background-image:url(images/icon-plus-24.png); background-repeat:no-repeat; background-position:center center; opacity:0; -webkit-transition:.25s; -moz-transition:.25s; -ms-transition:.25s; -o-transition:.25s; transition:.25s;}.thumb:hover .overlay { cursor:pointer; z-index:999; opacity:1;}.ie .thumb .overlay{visibility:hidden;}.ie .thumb:hover .overlay{visibility:visible;}.item-video .thumb .overlay{ background-image:url(images/icon-play-24.png);}.thumb img{width:100%;}
就是把原来的缩略图的宽度变成高度, 展开
展开全部
更多追问追答
追问
- -其实我对代码并不熟悉,你的意思是我贴的代码外面还有一层DIV还是说 这个? 能加我企鹅帮我吗? 还有50分可以全部都给你。
追答
class="thumb" 你在.thumb 在建一个
.thumb img {
MARGIN: auto;
WIDTH: 95%;
MAX-WIDTH: 100%!important;HEIGHT: auto!important;
width:expression(this.width > 95% ? "600px" : this.width)!important;
}
但是你的.thumb要有一个固定的宽和高
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询