Table of Contents
回复讨论(解决方案)
Home Web Front-end HTML Tutorial div+css在firefox中显示正常ie中不显示_html/css_WEB-ITnose

div+css在firefox中显示正常ie中不显示_html/css_WEB-ITnose

Jun 21, 2016 am 09:34 AM

<!--#include virtual="/inc/config.asp"--><!--#include virtual="/forbidIp.asp"--> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title><%=SiteName%></title><script type="text/javascript" src="/plan_tools/jquery-1.4.2.min.js"></script><script type="text/javascript" src="/plan_tools/cutstring.js"></script><style type="text/css">body {background-attachment:fixed;background-image:url(text.txt);margin:auto;text-align:center;}input{background-color:#B0C4DE;border:1px solid #77a;}/*#csstable{border:solid #add9c0; border-width:1px 0px 0px 1px;}#csstable td{border:solid #add9c0; border-width:0px 1px 1px 0px; padding:10px 0px;}*/.btn {background-color:#B0C4DE;border:1px solid #B0C4DE;cursor:pointer;text-align:center;width:38px;display:inline-block;/*FF2.0*/-moz-display:inline-block;font-family:Verdana;*font-family:Georgia;_font-family:Tahoma;padding:0 10px 1px;*padding:3px 3px 1px;_padding:0 4px 1px;line-height:18px;*line-height:14px;_line-height:16px;height:22px;font-size:12px;}#bottomNav {z-index:999;position:fixed;bottom:0;/*for ie*/width:960px;_position:absolute;_top: expression(documentElement.scrollTop + documentElement.clientHeight-this.offsetHeight);overflow:visible;margin:auto;left:100%;margin-left:-480px;}ul{margin:0; padding:0;}.clears{clear:both;}#tit{width:400px;}   #tit ul li{display:block; line-height:25px; padding:0 5px;  float:right; font-size:12px;    #tit ul li div{margin:5px 5px;}cursor:pointer; margin-right:0px;}.bgs{border:1px solid #77a;border-left:0px; background-color:#eee;padding:5px;}.bgs a	{color:#555; text-decoration:none;}.bgs a:hover	{color:#933; text-decoration:underline;  }.lb{border-left:1px solid #77a;}#ln{position:relative; height:1px;border-bottom:1px solid #77a; bottom:-1px; z-index:-1;width:305px;margin:-2px 0px 0px 0px;}.on {border-top:0px;background-color:#B0C4DE;}#cont{font-size:14px; border:1px solid #77a;border-bottom:0px; width:398px;background-color:#B0C4DE;line-height:25px;}</style><script type="text/javascript">	function del(obj) {	var msg = "确认办结?";		if (confirm(msg)==true){			var pid;				pid=$(obj).attr('id').toString().substring(3);	$.ajax({		type: "get",		url: "/plan_tools/del.asp",		data:{dpid:pid},		dataType: "text json",		contentType: "application/json; charset=gb2312",		success: function (data) {				alert("成功办结!");		document.getElementById("addNew").innerHTML="<a href='javascript:'>您有 <font color=red>"+eval("("+data+")").result+"</font> 条待办事宜</a>"		if(eval("("+data+")").result=="0") document.getElementById('cons').innerHTML='<center><b>没有待办事宜</b></center>';		$("#addNew").click();		},		error: function(XMLHttpRequest, textStatus, errorThrown) {                        alert(XMLHttpRequest.status);                        alert(XMLHttpRequest.readyState);                        alert(textStatus);                    },		});				}else{			return false;		}	}$(document).ready(function(){   var $tit=$("#tit ul li");    var $cont=$("#cont > div"); //得到显示隐藏的内容   var $btn=$("#btn");   $("#cont").hide();   $("#ln").hide();   $cont.eq(0).show().siblings().hide();//【【加此句】】   $btn.click(function(){   if($("#calendar-inputField").val()=="待办时间"){        alert("请选择待办时间");        $("#calendar-inputField").click();   		return false;   	}   if($("#plan").val()==""){        alert("请输入待办事宜");        $("#plan").focus();   		return false;   	}   	//新增待办事宜   	var planv;   	planv=$("#plan").val();   	$.post("/plan_tools/addPlan.asp", {  cons: escape(planv),date:$("#calendar-inputField").val() },function (data){	document.getElementById("addNew").innerHTML="<a href='javascript:'>您有 <font color=red>"+data.result+"</font> 条待办事宜</a>"	alert("添加成功!");	},"json");   	$("#checkList").click();   });   $tit.click(function(){      var $tit_index=$(this).index(); //得到标题索引      	var tamp=$cont.eq($tit_index).is(":hidden");      if(tamp){      	$("#cont").show();      	$("#ln").show();      	$tit.eq($tit_index).addClass("on").siblings().removeClass("on");            	if($tit_index==1){      		//查询待办事宜列表	$.ajax({		type: "POST",		url: "/plan_tools/selectList.asp",		dataType: "text json",		contentType: "application/json; charset=gb2312",		success: function (data) {		var myjson=eval("("+data+")");//转换为json对象		//alert(dataObj.mydata.length);//输出root的子对象数量 		//开始制表		var tablediv;		tablediv="<table id='csstable'><tr><th  align='left' width=270px style='font-size:12px;color:#4B4B4B;'>待办事宜:</th><th width=70px style='font-size:12px;color:#4B4B4B;'>最后时限</th><th style='font-size:12px;color:#4B4B4B;'>办结</th></tr>";		var arr=myjson.mydata, time='', cont='',tcont='',pid='';  		for (var i=0;i<arr.length;i++){  			time=arr[i].time; cont=arr[i].cont;pid=arr[i].pid;  			//表内容  			if(cont.length>40) tcont=cont.subCHStr(2, 40)+"...";  			if(cont.length<=40) tcont=cont; 			tablediv=tablediv+"<tr><td width=270px style='font-size:12px;color:#4B4B4B;' onclick='alert(document.getElementById(\"hid"+i+"\").value)' onmouseover=\"Tip('点击查看全部内容')\" onmouseout=\"UnTip()\" >"+tcont+"<INPUT TYPE=hidden id='hid"+i+"' VALUE='"+cont+"'></td><td width=70px style='font-size:12px;color:#4B4B4B;'>"+time+"</td><td align=right><button onclick='del(this)' class='btn' id='btn"+pid+"' onmouseover=\"Tip('已办结')\" onmouseout=\"UnTip()\"><img  src="/static/imghw/default1.png"  data-src="/plan_tools/JSCal2/js/jscal2.js"  class="lazy"    alt="div+css在firefox中显示正常ie中不显示_html/css_WEB-ITnose" ></img></button></td></tr>" 		  		}  		tablediv=tablediv+"</table>";  		document.getElementById('cons').innerHTML=tablediv;		},		error: function(XMLHttpRequest, textStatus, errorThrown) {                        alert(XMLHttpRequest.status);                        alert(XMLHttpRequest.readyState);                        alert(textStatus);                    },		});      	}      //$tit.eq($tit_index).addClass("on"); //切换背景      $cont.eq($tit_index).show().siblings().hide();      }else{      $("#cont").hide();      $("#ln").hide();      $tit.eq($tit_index).removeClass("on").siblings().removeClass("on");      $tit.eq($tit_index).addClass("gbs").siblings().addClass("bgs"); //切换背景       //$(this).addClass("bgs").siblings().addClass("bgs");      }   });});</script>    <link rel="stylesheet" type="text/css" href="/plan_tools/JSCal2/css/jscal2.css" />    <link rel="stylesheet" type="text/css" href="/plan_tools/JSCal2/css/border-radius.css" />    <link rel="stylesheet" type="text/css" href="/plan_tools/JSCal2/css/win2k/win2k.css" />    <script type="text/javascript" ></script>    <script type="text/javascript" src="/plan_tools/JSCal2/js/lang/cn.js"></script></head><body><script type="text/javascript" src="/plan_tools/wz_tooltip.js"></script><div   style="max-width:90%"></div><div id="datediv"></div><div id="bottomNav"><div id="cont">   <div>   <font style="line-height:18px;font-size:12px;color:#4B4B4B;">新增事宜:</font>   <table>   <tr>   <td width=270px><input type="text" id="plan" style="width:270px;color:#4B4B4B"></td>   <td width=70px><input id="calendar-inputField" readonly value="待办时间" style="text-align:center;color:#4B4B4B;width:70px;"/>		<script>    		Calendar.setup({        		trigger    : "calendar-inputField",        		inputField : "calendar-inputField"    		});		</script>	</td>	<td align=right><button class="btn" id="btn" onmouseover="Tip('确定添加')" onmouseout="UnTip()"><img  src="/static/imghw/default1.png"  data-src="/plan_tools/yes.gif"  class="lazy"    alt="div+css在firefox中显示正常ie中不显示_html/css_WEB-ITnose" ></img></button></td>   </tr>   </table></div>   <div id="cons"></div></div><div id="ln"></div><div id="tit">   <ul>      <li class="bgs" id="checkList" onmouseover="Tip('新增待办事宜')" onmouseout="UnTip()"   style="max-width:90%"><div><img  src="/static/imghw/default1.png"  data-src="/plan_tools/add.gif"  class="lazy"   alt="div+css在firefox中显示正常ie中不显示_html/css_WEB-ITnose" ></img></div></li>      <li class="bgs lb" id="addNew"><a href="javascript:">您有<font color=red>      <%      set rspt = conn.execute("select count(0) from planList where p_sata=0")		if not rspt.eof then			response.write rspt(0)			response.write "<script>document.getElementById('cons').innerHTML='<center><b>没有待办事宜</b></center>'</script>"		end if		rspt.close      %>      </font>条待办事宜</a></li>   </ul></div></div></body></html>
Copy after login


回复讨论(解决方案)

这个效果真没办法看,楼主截个对比图,或者用纯的html+js 模拟这个问题出来,才好解决

这个效果真没办法看,楼主截个对比图,或者用纯的html+js 模拟这个问题出来,才好解决
你好,,请你直接去掉所有asp内容,也不用加载js就可以显示在firefox的页面上了,只要能显示在ie上就可以,其他js的操作可以不去管的,只是你点击后会报错,但是不影响显示。而我现在的问题是压根不显示

这个div。

这个效果真没办法看,楼主截个对比图,或者用纯的html+js 模拟这个问题出来,才好解决

另,我现在悲剧的是找不到问题。。。。

我发现ie8也会显示,但是单位内网的ie7就是不显示~!!!!

_top: expression(documentElement.scrollTop + documentElement.clientHeight-this.offsetHeight);


这句的问题,建议最好不要在css中写表达式。

这个效果 楼主 用js来写吧

_top: expression(documentElement.scrollTop + documentElement.clientHeight-this.offsetHeight);


这句的问题,建议最好不要在css中写表达式。

这个效果 楼主 用js来写吧
好的,因为51放假占时没法试验,,等2号回单位去试试再说,先谢谢了。

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What is the purpose of the <progress> element? What is the purpose of the <progress> element? Mar 21, 2025 pm 12:34 PM

The article discusses the HTML &lt;progress&gt; element, its purpose, styling, and differences from the &lt;meter&gt; element. The main focus is on using &lt;progress&gt; for task completion and &lt;meter&gt; for stati

What is the purpose of the <datalist> element? What is the purpose of the <datalist> element? Mar 21, 2025 pm 12:33 PM

The article discusses the HTML &lt;datalist&gt; element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

What are the best practices for cross-browser compatibility in HTML5? What are the best practices for cross-browser compatibility in HTML5? Mar 17, 2025 pm 12:20 PM

Article discusses best practices for ensuring HTML5 cross-browser compatibility, focusing on feature detection, progressive enhancement, and testing methods.

What is the purpose of the <meter> element? What is the purpose of the <meter> element? Mar 21, 2025 pm 12:35 PM

The article discusses the HTML &lt;meter&gt; element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates &lt;meter&gt; from &lt;progress&gt; and ex

How do I use the HTML5 <time> element to represent dates and times semantically? How do I use the HTML5 <time> element to represent dates and times semantically? Mar 12, 2025 pm 04:05 PM

This article explains the HTML5 &lt;time&gt; element for semantic date/time representation. It emphasizes the importance of the datetime attribute for machine readability (ISO 8601 format) alongside human-readable text, boosting accessibilit

How do I use HTML5 form validation attributes to validate user input? How do I use HTML5 form validation attributes to validate user input? Mar 17, 2025 pm 12:27 PM

The article discusses using HTML5 form validation attributes like required, pattern, min, max, and length limits to validate user input directly in the browser.

What is the viewport meta tag? Why is it important for responsive design? What is the viewport meta tag? Why is it important for responsive design? Mar 20, 2025 pm 05:56 PM

The article discusses the viewport meta tag, essential for responsive web design on mobile devices. It explains how proper use ensures optimal content scaling and user interaction, while misuse can lead to design and accessibility issues.

What is the purpose of the <iframe> tag? What are the security considerations when using it? What is the purpose of the <iframe> tag? What are the security considerations when using it? Mar 20, 2025 pm 06:05 PM

The article discusses the &lt;iframe&gt; tag's purpose in embedding external content into webpages, its common uses, security risks, and alternatives like object tags and APIs.

See all articles