实现背景图片垂直居中定位2种方法
第一种方法
background: url("../img/images/login_Bg.png")
no-repeat center center;
/*背景垂直居中*/
background-size: cover;
第二种方法
background-image: url(../img/images/login_Bg.png) ;
background-repeat : no-repeat ;
background-position: center center;
background-size: cover;
上面2个方法都可以在不同的分辨率下定位并且居中背景图片。
方法都测试过,可行。待更新我的前端成长史。
谢谢聪明的你来看。