0
我是新的UI應用程序集成。我有一個jsp頁面和whick代碼下面給出:jsp頁面中不顯示背景圖片和Logo圖片?
`
<!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>
`
下面我想背景圖片這裏我添加了內嵌的css,但是背景圖像沒有被忽略,而且logo也沒有顯示出來。
請有人可以幫助我得到這個?提前致謝。
可能路徑錯誤,請嘗試更改網址路徑。 URL( 「../資源/ IMG/xyymm/home.jpg」);或url(「./ resources/img/xyymm/home.jpg」);根據你的路徑。 – Alice
感謝您的時間,但我試過這個解決方案,但它沒有幫助我。 –