IE无法加载到外部CSS样式, 用360浏览器就可以,上CSS引用代码[急]_html/css_WEB-ITnose
<!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="/static/imghwm/default1.png" data-src="images/register_logo.gif" class="lazy" 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的类型写反了。
我试过 , 还是没有用呢
去掉也不管用吗?
那就不知道你哪里出的错了,我自己试了下,是没有问题的~~
去掉也不管用吗?
那就不知道你哪里出的错了,我自己试了下,是没有问题的~~
我想可能是浏览器的问题吧
浏览器还不至于出这么低级的问题的,先从自己的代码找起吧。

HTMLtagsdefinethestructureofawebpage,whileattributesaddfunctionalityanddetails.1)Tagslike,,andoutlinethecontent'splacement.2)Attributessuchassrc,class,andstyleenhancetagsbyspecifyingimagesources,styling,andmore,improvingfunctionalityandappearance.

The future of HTML will develop in a more semantic, functional and modular direction. 1) Semanticization will make the tag describe the content more clearly, improving SEO and barrier-free access. 2) Functionalization will introduce new elements and attributes to meet user needs. 3) Modularity will support component development and improve code reusability.

HTMLattributesarecrucialinwebdevelopmentforcontrollingbehavior,appearance,andfunctionality.Theyenhanceinteractivity,accessibility,andSEO.Forexample,thesrcattributeintagsimpactsSEO,whileonclickintagsaddsinteractivity.Touseattributeseffectively:1)Usese

The alt attribute is an important part of the tag in HTML and is used to provide alternative text for images. 1. When the image cannot be loaded, the text in the alt attribute will be displayed to improve the user experience. 2. Screen readers use the alt attribute to help visually impaired users understand the content of the picture. 3. Search engines index text in the alt attribute to improve the SEO ranking of web pages.

The roles of HTML, CSS and JavaScript in web development are: 1. HTML is used to build web page structure; 2. CSS is used to beautify the appearance of web pages; 3. JavaScript is used to achieve dynamic interaction. Through tags, styles and scripts, these three together build the core functions of modern web pages.

Setting the lang attributes of a tag is a key step in optimizing web accessibility and SEO. 1) Set the lang attribute in the tag, such as. 2) In multilingual content, set lang attributes for different language parts, such as. 3) Use language codes that comply with ISO639-1 standards, such as "en", "fr", "zh", etc. Correctly setting the lang attribute can improve the accessibility of web pages and search engine rankings.

HTMLattributesareessentialforenhancingwebelements'functionalityandappearance.Theyaddinformationtodefinebehavior,appearance,andinteraction,makingwebsitesinteractive,responsive,andvisuallyappealing.Attributeslikesrc,href,class,type,anddisabledtransform

TocreatealistinHTML,useforunorderedlistsandfororderedlists:1)Forunorderedlists,wrapitemsinanduseforeachitem,renderingasabulletedlist.2)Fororderedlists,useandfornumberedlists,customizablewiththetypeattributefordifferentnumberingstyles.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Zend Studio 13.0.1
Powerful PHP integrated development environment

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),
