图片自适应居中
不改变图片的高,仅仅是对图片的两边同时进行自适应隐藏,banner自适应
<style> .father{ position: relative; width: 100%; height: 110px; overflow:hidden; } .father img{ position: absolute; left: 50%; margin-left: -960px;} </style>
<div class="father"> <img src="son.jpg" alt="" /> </div>