css - 一种让超大banner图片不拉伸、全屏宽、居中显示的方法
< html > < head > < title > Title </ title > < style > .bannerbox { width:100%; position:relative; overflow:hidden; height:200px; } .banner { width:3000px; position:absolute; left:50%; margin-left:-1500px; } </ style > </ head > < body > < div class = "bannerbox" > < div class = "banner" > < img src = "t1.jpg" > </ div > </ div > </ body > </ html > 来源: CSDN 作者: Alvin哥哥 链接: https://blog.csdn.net/m0_37412958/article/details/78165531