.imageButton {
width: 14px;
height: 50px;
}
.divClass{
width:100px;
height: 30px;
}
<div class="divClass"><img class="imageButton" /></div>
這裏的.divClass的高度是dynamic.Now我的問題是顯示需要根據div的高度裁剪此圖像。例如: - 如果div的高度是30那麼img需要裁剪top-((img's height-div's height)/2)
和bottom-((img's height-div's height)/2)
如何根據父級高度動態裁剪圖像
如何實現這一目標?
我需要它的圖像標記。 – JackAss