Home  >  Article  >  Web Front-end  >  IE无法加载到外部CSS样式, 用360浏览器就可以,上CSS引用代码[急]_html/css_WEB-ITnose

IE无法加载到外部CSS样式, 用360浏览器就可以,上CSS引用代码[急]_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-21 09:25:381207browse

<!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=utf-8"/>    <title>新用户注册页面</title>    <link  rel="stylesheet" href="css/register.css" type="css/text"/>    <script type="text/javascript" src="js/jquery-1.8.3.js"></script>	<script>      		//邮箱获取焦点时		function emailGo(){			var email = $("#email").val();				if(email == ""){					$("#emailId").html("请输入您常用的电子邮箱");				}		}		//邮箱失去焦点时		function emailOut(){				var email = $("#email").val();				if(email==""){					$("#emailId").html("电子邮箱不能为空");					return false;				}				if(email.indexOf("@")==-1){					$("#emailId").html("Email格式不正确");					return false;				}				if(email.indexOf(".")==-1){					$("#emailId").html("Email格式不正确");					return false;				}				$("#emailId").html("");				return true;		}		//用户名						$(document).ready(function(){			//保密邮箱			$("#email").focus(emailGo);			$("#email").blur(emailOut);			var a =	$("#userNameId").html();			alert(a);		});	</script>    <script type="text/javascript" src="js/register.js"></script></head><body><div id="header"><img src="images/register_logo.gif" alt="logo"/></div><div id="main">    <table width="100%" border="0" cellspacing="0" cellpadding="0">        <tr>            <td class="bg bg_top_left"></td>            <td class="bg_top"></td>            <td class="bg bg_top_right"></td>        </tr>        <tr>            <td class="bg_left"></td>            <td class="content">                <form id="registerForm" action="" method="post" name="myform">                    <dl>                        <dt>通行证用户名:</dt>                        <dd><input type="text" id="userName" class="inputs userWidth"/> @163.com</dd>                        <div id="userNameId">啊啊</div>                    </dl>                    <dl>                        <dt>登录密码:</dt>                        <dd><input type="password" id="pwd" class="inputs"/></dd>                        <div id="pwdId"></div>                    </dl>                    <dl>                        <dt>重复登录密码:</dt>                        <dd><input type="password" id="repwd" class="inputs"/></dd>                        <div id="repwdId"></div>                    </dl>                    <dl>                        <dt>性别:</dt>                        <dd><input name="sex" type="radio" value="" checked="checked"/>男 <input name="sex" type="radio" value="" />女 </dd>                    </dl>                    <dl>                        <dt>真实姓名:</dt>                        <dd><input type="text" id="realName" class="inputs" /></dd>                    </dl>                    <dl>                        <dt>昵称:</dt>                        <dd><input type="text" id="nickName" class="inputs"/></dd>                        <div id="nickNameId"></div>                    </dl>                    <dl>                        <dt>关联手机号:</dt>                        <dd><input type="text" id="tel" class="inputs"/></dd>                        <div id="telId"></div>                    </dl>                    <dl>                        <dt>保密邮箱:</dt>                        <dd><input type="text" id="email" class="inputs"/></dd>                        <div id="emailId"></div>                    </dl>                    <dl>                        <dt></dt>                        <dd><input name=" " type="image" src="images/button.gif"/></dd>                    </dl>                </form>            </td>            <td class="bg_right"></td>        </tr>        <tr>            <td class="bg bg_end_left"></td>            <td class="bg_end"></td>            <td class="bg bg_end_right"></td>        </tr>    </table></div></body></html>



下面是CSS

@charset "utf-8";/* CSS Document */body,dl,dt,dd,div,form {padding:0;margin:0;}#header,#main{	width:650px;	margin:0 auto;	}.bg{	background-image:url(../images/register_bg.gif);	background-repeat:no-repeat;	width:6px;	height:6px;	}	.bg_top_left{		background-position:0px 0px;		}	.bg_top_right{		background-position:0px -6px;		}	.bg_end_left{		background-position:0px -12px;		}	.bg_end_right{		background-position:0px -18px;		}	.bg_top{		border-top:solid 1px #666666;		}	.bg_end{		border-bottom:solid 1px #666666;		}	.bg_left{		border-left:solid 1px #666666;		}	.bg_right{		border-right:solid 1px #666666;		}.content{	padding:10px;	}	.inputs{		border:solid 1px #a4c8e0;		width:150px;		height:15px;	}		.userWidth{		width:110px;		}	.content div{		float:left;		font-size:12px;		color:#000;		}	dl{		clear:both;		}	dt,dd{		float:left;		}	dt{		width:130px;		text-align:right;		font-size:14px;		height:30px;		line-height:25px;		}	dd{		font-size:12px;		color:#666666;		width:180px;		}/*当鼠标放到文本框时,提示文本的样式*/.import_prompt{	border:solid 1px #ffcd00;	background-color:#ffffda;	padding-left:5px;	padding-right:5px;	line-height:20px;	}/*当文本框内容不符合要求时,提示文本的样式*/.error_prompt{	border:solid 1px #ff3300;	background-color:#fff2e5;	background-image:url(../images/li_err.gif);	background-repeat:no-repeat;	background-position:5px 2px;	padding:2px 5px 0px 25px;	line-height:20px;	}/*当文本框内容输入正确时,提示文本的样式*/.ok_prompt{	border:solid 1px #01be00;	background-color:#e6fee4;	background-image:url(../images/li_ok.gif);	background-repeat:no-repeat;	background-position:5px 2px;	padding:2px 5px 0px 25px;	line-height:20px;	}

保证路径是正确的 , 不知道为啥?


回复讨论(解决方案)

<link  rel="stylesheet" href="css/register.css" />

<link  rel="stylesheet" href="css/register.css" type="text/css"/>


type的类型写反了。

<link  rel="stylesheet" href="css/register.css" type="text/css"/>


type的类型写反了。



我试过 , 还是没有用呢  

去掉也不管用吗?

那就不知道你哪里出的错了,我自己试了下,是没有问题的~~

去掉也不管用吗?

那就不知道你哪里出的错了,我自己试了下,是没有问题的~~



我想可能是浏览器的问题吧  

浏览器还不至于出这么低级的问题的,先从自己的代码找起吧。

Statement:
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