今天用css布局了一张jsp页面,就是在页面上放了几张图片,在ie8下显示正常,而在firefox中却是一片空白,不知其原因,搞得心都碎了
我的项目目录如下:
WebRoot
--css
--login.css
--img
--login.jps
--loginHead.jpg
--META-INF
......
--WEB-INF
......
--login.jsplogin.jsp代码如下:<%@ page language="java" import="java.util.*" pageEncoding="GBK"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'login.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page"> <link rel="stylesheet" type="text/css" href="css/login.css"> </head>
<body> <div id="container">
<div id="head"></div>
<div id="mid">
<div id="title"></div>
</div>
<div id="bottom"></div>
</div> </body>
</html>上面表了颜色的部分是我写的,其他的是MyEclipse自动生成login.css代码如下:
#container{
width:960px;
height:700px;
}
#head{
background:url(../img/loginHead.jpg) middle center no-repeat;
background-repeat:no-repeat;
width:950px;
height:46px;
}
#mid{
width:950px;
height:450px;
background:url(../img/login.jpg) middle center no-repeat;
}以上页面在ie中完全能正常显示,但在firefox中为一片空白,如果把图片等直接写在标签里面如<div style=".....">也可以显示,页面的普通文字也可以显示向各位经验丰富的高手求助
我的项目目录如下:
WebRoot
--css
--login.css
--img
--login.jps
--loginHead.jpg
--META-INF
......
--WEB-INF
......
--login.jsplogin.jsp代码如下:<%@ page language="java" import="java.util.*" pageEncoding="GBK"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'login.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page"> <link rel="stylesheet" type="text/css" href="css/login.css"> </head>
<body> <div id="container">
<div id="head"></div>
<div id="mid">
<div id="title"></div>
</div>
<div id="bottom"></div>
</div> </body>
</html>上面表了颜色的部分是我写的,其他的是MyEclipse自动生成login.css代码如下:
#container{
width:960px;
height:700px;
}
#head{
background:url(../img/loginHead.jpg) middle center no-repeat;
background-repeat:no-repeat;
width:950px;
height:46px;
}
#mid{
width:950px;
height:450px;
background:url(../img/login.jpg) middle center no-repeat;
}以上页面在ie中完全能正常显示,但在firefox中为一片空白,如果把图片等直接写在标签里面如<div style=".....">也可以显示,页面的普通文字也可以显示向各位经验丰富的高手求助
解决方案 »
- 怎么将提交按钮调用js并且还能实现提交按钮的功能?
- 问下jsp页面上Date格式错误的问题
- 字符串匹配的问题
- org.hibernate.hql.ast.QuerySyntaxException: teachers is not mapped. [from teachers tea where tea.name=:teaName and tea.password=
- 请问web.xml修改的时候eclipse要验证很长时间,咋办啊??
- 具有什么特征的项目需要分布式架构!!?(请高人指点指点!谢)
- struts2 上传文件问题 就大神解答
- 我的webservice怎么移植啊??请教高手!!!!!
- 初学,如何在程序执行的时候,动态的添加button或其他组件?
- 请教两种tomcat的区别???
- ssh2 启动不了
- 求助如何压缩数据后在网络上传输
body{
background-image: url("../img/mm.bmp");
background-repeat: no-repeat;
background-position: 35% 15%;
}