根據元素的寬度自適應高度

###效果圖 輸入圖片說明 ###佈局方式 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%;
		}
相關文章
相關標籤/搜索