资料区
初始页面搭建(包含head、aside、footer以及login):webapp.zip
1、增加login.jsp的背景图
这里设置.login-page是因为使用的是AdminLTE中css的一个属性样式,所以在这个基础上进行添加样式
一次写如下(建议):
<style type="text/css">.login-page {background: url("${pageContext.request.contextPath}/img/login.jpg") no-repeat center center fixed;background-size: cover;}</style>
background-siz:cover是要把背景图像扩展至足够大,以使背景图像完全覆盖背景区域,最好设置这个或100% 100% 。
分开写如下:
body {
background-image: url("../img/bg.jpg");
background-position: center center;
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
}
