这个jsp主页在Mozilla和IE 7上运行良好,但在chrome中没有。没有拍摄任何图像。请指教。
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!-- Libraries to include jstl tags -->
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!-- Libraries to include jstl tags -->
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!-- Libraries to include jstl tags -->
<!DOCTYPE HTML>
<html>
<head>
<%
String ua=request.getHeader("User-Agent").toLowerCase();
// condition used for mobile compatibility
if(ua.matches("(?i).*((android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hipt)) //Many such conditions are checked but I removed them to make it simple
{
response.sendRedirect("index?source=mobile");
return;
}
%>
<title>Arizona Health Sciences Library EBM Search Engine</title>
<link rel="stylesheet" type="text/css" href="css/style_index.css" > -- included css
</head>
<body>
<!-- Images that are not getting loaded -->
<a href="http://arizona.edu"><img src="images/ua_logo_white.png" height="80" /></a>
<div class="floatright">
<!-- Images that are not getting loaded -->
<a href="http://ahsl.arizona.edu/home"><img src="images/AHSL.png" height="80" width="100" /></a>
</div>
<!-- Links to different search engines -->
<h2><a href="search?module=2">General Medicine</a></h2>
<h2><a href="search?module=1">Emergency Medicine</a></h2>
<h2><a href="search?module=3">Medical Imaging</a></h2>
<h2><a href="search?module=4">Pediatrics</a></h2>
<h2><a href="search?module=5">Surgery / Critical Care</a></h2>
<!-- Static texts hard coded - Need to be replaced -->
<footer>
All content ©2012 Arizona Board of Regents. All rights reserved.
</footer>
</body>
</html>
style_index.css - 这是用于此页面的CSS。我不确定是否必须对此样式表进行更改。
body {
font-family: 'Myriad Pro', Arial, Helvetica, sans-serif;
}
body {
background: url('../images/bg_top_repeat_dark_blue.jpg') repeat-x #f3f3f3;
}
image
{
border-width: 0;
}
#wrapper {
width: 800px;
margin: 100px auto;
}
#logo {
height: 397px;
text-indent: -10000px;
margin-bottom: -135px;
}
#logo.blank {
text-indent: 0;
}
h1 {
padding-top: 80px;
color: #202080;
font-size: 36px;
font-weight: bold;
text-align: center;
white-space: nowrap;
}
h2 {
color: #202080;
font-size: 30px;
font-weight: bold;
text-align: left;
}
.floatright
{
float: right;
margin-right: 18px;
}
form {
background: url('../images/search_box.png') no-repeat;
height: 47px;
}
input {
background: none;
border: none;
outline: 0;
}
input.text {
width: 670px;
padding: 13px 0 13px 24px;
color: #505050;
font-size: 20px;
float: left;
}
input.submit {
width: 104px;
padding: 13px 0 13px 10px;
float: right;
cursor: pointer;
}
.ui-grid-a .ui-block-a {
width: 30%;
}
footer {
height: 50px;
padding: 5px 0 20px 0;
text-align: center;
}
答案 0 :(得分:0)
当您使用Chrome浏览器打开网页时,请按f12。一个窗口将打开。现在在右边它会显示你的css代码。用红色或黄色警告标志检查代码。这些迹象表明代码错误或不需要镀铬。