根据元素的宽度自适应高度

###效果图 输入图片说明 ###布局方式 html <a href="" class="item"> <img alt="" src="images/icon-rule.gif" class="img-full"> </a> csscss

.item{
			width: 100%;
			display: block;
			height:0;
			padding-bottom: 75%;
			overflow: hidden;
			position: relative;
		}
.item img {
			position: absolute;
			left: 0;
			top:0;
			border-top-left-radius:3px;
			border-top-right-radius:3px;
			min-height: 100%;
		}
相关文章
相关标签/搜索