Я новичок в интеграции дизайна пользовательского интерфейса в приложение. У меня есть страница JSP и Уик код приведен ниже:Фоновое изображение и логотип Изображение не отображается на странице jsp?
`
<!DOCTYPE html>
<%@page import="java.util.Enumeration"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<html lang="en">
<head>
<jsp:directive.include file="include_metatags.jsp" />
<title><s:message code="form.home.testEvosnapResponse" arguments="${applicationScope['APPLICATION_HEADER_TEXT']}"/></title>
<jsp:directive.include file="include_head.jsp" />
<link href="${pageContext.request.contextPath}/resources/css/datatables.min.css" rel="stylesheet">
<style>
body,html{
background-image : url("resources/img/xyymm/home.jpg");
background-attachment : fixed;
background-position : center center;
background-size : cover;
}
</style>
</head>
<body>
<jsp:include page="menu.jsp">
<jsp:param value="xylyx" name="currentpage" />
</jsp:include>
<div class="container amo2">
<div class="card card-container2"
style="padding: 20px 40px 90px 40px;">
<img id="profile-img" class="profile-img-card" src="resources/img/xyymm/fintech_img.png">
<h4 style="margin-bottom: 20px;">Evosnap Response Page</h4>
<div class="container-fluid mer table-responsive" id="wht">
<ol class="breadcrumb">
<li><a href="${pageContext.request.contextPath}/home">Home</a></li>
<li><a href="${pageContext.request.contextPath}/evosnapTest">Evosnap Test</a></li>
<li>Evosnap Response Page</li>
</ol>
<div class="body-content" style="padding-left: 15px;">
<p>${message}</p>
Transaction Details
<table style="width: 60%">
<tr>
<td><s:message code="form.transactionlist.transactionId" /></td>
<td>${transaction.transactionId}</td>
</tr>
<tr>
<td><s:message code="form.transactionlist.merchantId" /></td>
<td>${transaction.merchantId}</td>
</tr>
<tr>
<td><s:message code="form.transactionlist.customerId" /></td>
<td>${transaction.customerId}</td>
</tr>
<tr>
<td><s:message code="form.transactionlist.name" /></td>
<td>${transaction.lastName},${transaction.firstName}</td>
</tr>
<tr>
<td><s:message code="form.transactionlist.invoiceNumber" /></td>
<td>${transaction.invoiceNum}</td>
</tr>
<tr>
<td><s:message code="form.transactionlist.amount" /></td>
<td>${transaction.amount}</td>
</tr>
<tr>
<td><s:message code="form.transactionlist.ipAddress" /></td>
<td>${transaction.ipAddress}</td>
</tr>
<tr>
<td><s:message code="form.transactionlist.currency" /></td>
<td>${transaction.currency}</td>
</tr>
<tr>
<td><s:message code="form.transactionlist.orderStatus" /></td>
<td>${transaction.orderStatus}</td>
</tr>
</table>
</div>
</div>
<!-- /card-container -->
</div>
</div>
<jsp:directive.include file="include_body_scripts.jsp" />
</body>
</html>
`
ниже мой скриншот, когда я запускаю этот файл JSP:
Я хочу фоновое изображение здесь, который я добавил как встроенный css, но фоновое изображение не рассылается правильно, а также логотип не отображается.
Пожалуйста, кто-нибудь может помочь мне получить это? Заранее спасибо.
Возможно, путь неправильный, попробуйте изменить URL-адрес. URL ("../ ресурсы/IMG/xyymm/home.jpg"); или url ("./ resources/img/xyymm/home.jpg"); по вашему пути. – Alice
Спасибо за ваше время, но я пробовал это решение, но мне это не помогло. –