<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style type="text/css">
body{
background-image: url("1.jpeg");
background-repeat: repeat;
}
</style>
</head>
<body>
</body>
</html>
/**
* imgHtml
*/
public static String imgHtml(List<String> lstr){
StringBuilder li = new StringBuilder();
//拼接一段HTML代码
li.append("<!DOCTYPE html>" +
"<html lang=\"en\">" +
"<head>" +
"<meta charset=\"UTF-8\">\n" +
"<title>Title</title>\n" +
"<style type=\"text/css\">\n" +
"body{" +
"background-image: url(\"" +
"1.jpeg" +
"\");" +
"background-repeat: repeat;" +
"}" +
"</style>" +
"</head>" +
"<body>" +
"</body>" +
"</html>");
return li.toString();
}