2014-06-20 241 views
0

这个jsp主页在Mozilla和IE 7中正常工作,但没有在Chrome中。没有选择任何图像。请指教。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

您是否检查过Chrome设置?也许重置?尝试隐身?任何插件运行? (你的标记/ CSS看起来很好)。这是在开发?该页面是否可以在线访问? – Jack

+0

我试过所有这些,它没有工作。我不得不删除div元素下的几个类属性,并设法让他们工作..谢谢! – Karthikeyan

回答

0

当您在Chrome浏览器中打开网页时,按住f12按钮。一个窗口将打开。现在在右边会显示你的css代码。用红色或黄色警告标志检查代码。这些标志告诉代码是错误的或不需要铬。

+1

谢谢你的建议..它有助于:) – Karthikeyan