<div style="background-image:url(../images/a.jpg)"><乱喊form action="login.do"><input type="text" name="userName"/><input type="password" name="password"/竖陪慎></form></div>
里面用table的话,可以加在table里面, <table style=".........."></table>
1、修改背景图片和动态语斗稿言类【jsp】并无关联。
2、背景图片是css属性background来设置的。具体使用:
background:url(images/xx.jpg) no-repeat center center
url()是背景存放位置。
no-repeat不平铺,就是图片多大就展示多大,还有其他的平铺方式。repeat-x:横向平铺,repeat-y纵向平铺,repeat:横向纵向平启散铺。
center center是背景显示在容器里头的位置,当然也可以使用10px 10px像素来表示从什么地方开始显示。
试试用css设置背景。
<body style="background:url(image/background.jpg)" >
至于路径,在eclipse预览时候能看空旁孝见不一定说明路径一定正确。很多时候本地的相对路径放到服务器解析的时候就找不到了。一般是页面设置了<base>标签时候容易出这种问题。
弄衡弊简个css样式咐裤.login_top_bg {
background-image: url(login-top-bg.gif)
background-repeat: repeat-x
}
或者<table background=“login-top-bg.gif”卜亮>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)