您好,欢迎访问一九零五行业门户网

jsp怎么将图片设置为背景

jsp怎么将图片设置为背景?解决方法有两种。
首先把图片放在img文件夹下的 ,img是放在myeclipse的webroot里面的,否则路径可能不对。
(1):
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><title>无标题文档</title></head><body background="img/1.jpg"></body></html>
(2):
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><title>无标题文档</title><style>.b{background-image:url(img/1.jpg)}</style></head><body class="b"></body></html>
还可以把css单独写,不管什么页面用的时候都可以用link调用那个css的名字就可以了。
以上就是jsp怎么将图片设置为背景的详细内容。
其它类似信息

推荐信息