哪位大侠给我支支招。。。_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" mrc="text/html; charset=gb2312" /><style type="text/css"><!--body { padding:0; margin:0; }a.oyj-clj:link{color:#FFFFFF;}a.oyj-clj:visited{color:#FFFFFF;}a.oyj-clj:hover{color:#FFFF00;}a.oyj-clj:active{color:#FFFFFF;}a.oyj-clj:link{text-decoration:none;} #oyj-oyj-ul {width:1000px;background-color:#000000;}#oyj-logo {padding-top:10px;margin-left:10px;height:109px;width:255px;position:absolute;}#oyj-huanying {height:20px;width:1000px;padding-top:10px;margin-left:0px;font-size:12px;color:#FFFFFF;}#oyj-ding {height:25px;width:1000px;}#oyj-zhuce {font-size:12px;padding-top:0;width:80px;height:20px;float:right;color:#FFFFFF;}#oyj-tel {font-size:12px;width:100px;height:20px;float:right;color:#ffffff;}#oyj-menu {height:20px;width:600px;padding-top:80px;margin-left:400px;}#oyj-menu ul li {color: #FFFFFF;float: left;font-size: 12px; padding:0; margin:0; list-style:none;}#oyj-menu ul {margin:0px auto 0px auto;padding:0; margin:0; float:right;}#oyj-tel {font-size:12px;color:#ffffff;height:20px;width:300pxpadding-top:50px;margin-left:700px;}#oyj-ul {line-height: 24px;list-style-type: none;background:#666;}#oyj-ul a {display: block;width: 80px;text-align:center;}#oyj-ul a:link {color:#ffffff;/*未点击时链接字体颜色*/text-decoration:none;}#oyj-ul a:visited {color:#FFFFff;text-decoration:none;}#oyj-ul a:hover {color:#FFFF00;text-decoration:none;font-weight:bold;}#oyj-ul li {float: left;width: 80px;background:#FF0099;/*主导航条背景*/}#oyj-ul li a:hover {background:#FF66CC;/*鼠标移位颜色*/}#oyj-ul li ul {line-height: 27px;list-style-type: none;text-align:left;left: -999em;width: 80px;position: absolute;}#oyj-ul li ul li {float: left;width: 100px;background: #000000;/*子菜单背景*/}#oyj-ul li ul a {display: block;width: 100px;text-align:center}#oyj-ul li ul a:link {color:#ffffff;text-decoration:none;}#oyj-ul li ul a:visited {color:#ffffff;text-decoration:none;}#oyj-ul li ul a:hover {color:#F3F3F3;text-decoration:none;font-weight:normal;background:#C00;}#oyj-ul li:hover ul {left: auto;}#oyj-ul li.sfhover ul {left: auto;}#content {clear: left;}--></style><script type=text/javascript><!--//--><![CDATA[//><!--function menuFix() {var sfEls = document.getElementById("oyj-ul").getElementsByTagName("li");for (var i=0; i<sfEls.length; i++) {sfEls[i].onmouseover=function() {this.className+=(this.className.length>0? " ": "") + "sfhover";}sfEls[i].onMouseDown=function() {this.className+=(this.className.length>0? " ": "") + "sfhover";}sfEls[i].onMouseUp=function() {this.className+=(this.className.length>0? " ": "") + "sfhover";}sfEls[i].onmouseout=function() {this.className=this.className.replace(new RegExp("( ?|^)sfhover\\b"),"");}}}window.onload=menuFix;//--><!]]></script><body><div id=oyj-header style="width: 100%; background-color:#000000; height:129px;"><div id=oyj-oyj-ul style="width:1000px; margin:0 auto;"><div id=oyj-ding><div id=oyj-huanying>*欢迎来到达诚网络,我们会用我们的真诚为您服务* 联系电话:18672175995<div id=oyj-zhuce><a href="#" class="oyj-clj">登陆</a><a href="#" class="oyj-clj">注册</a></div><div align="right"></div></div></div><div id=oyj-logo><img src="/static/imghw/default1.png" data-src="1.png" class="lazy" style="max-width:90%" style="max-width:90%" / alt="哪位大侠给我支支招。。。_html/css_WEB-ITnose" ></div><div id=oyj-menu><ul id="oyj-ul"><li><a href="#">首页</a></li><li><a href="#">虚拟主机</a><ul><li><a href="#">国内主机</a></li><li><a href="#">香港主机</a></li><li><a href="#">美国主机</a></li></ul></li><li><a href="#">云VPS</a><ul><li><a href="#">国内云VPS</a></li><li><a href="#">香港云VPS</a></li><li><a href="#">美国云VPS</a></li></ul></li><li><a href="#">免费CDN</a></li><li><a href="#">服务器租用</a><ul><li><a href="#">国内服务器租用</a></li><li><a href="#">香港服务器租用</a></li><li><a href="#">美国服务器租用</a></li></ul></li><li><a href="#">帮助中心</a></li></ul></div></div></div></body></head>
在oyj-logo上 CSS有position:absolute;在本地预览页面正常,在服务器预览会错位,怎样修改达到完美效果?
回复讨论(解决方案)
你那么多 是用来做什么的?定位的么?用空格来定位?好吧,I have no words to say...
贴个你说的乱的网址瞧瞧
贴个你说的乱的网址瞧瞧
http://oyj424.ceshiyuming.yousn-cn.vip3237.net/templets/default/header.html
试试加个top试试
#oyj-logo {padding-top:10px;margin-left:10px;height:109px;width:255px;position:absolute;top:15px;}
用你给的网页另存为改的:
<!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" mrc="text/html; charset=gb2312" /><style type="text/css"><!--body { padding:0; margin:0; }a.oyj-clj:link{color:#FFFFFF;}a.oyj-clj:visited{color:#FFFFFF;}a.oyj-clj:hover{color:#FFFF00;}a.oyj-clj:active{color:#FFFFFF;}a.oyj-clj:link{text-decoration:none;} #oyj-oyj-ul {width:1000px;background-color:#000000;}#oyj-logo { padding-top:10px; margin-left:10px; height:109px; width:255px; position:absolute; zoom:1; top:15px;}#oyj-huanying {height:20px;width:1000px;padding-top:10px;margin-left:0px;font-size:12px;color:#FFFFFF;}#oyj-ding {height:25px;width:1000px;}#oyj-zhuce {font-size:12px;padding-top:0;width:80px;height:20px;float:right;color:#FFFFFF;}#oyj-tel {font-size:12px;width:100px;height:20px;float:right;color:#ffffff;}#oyj-menu {height:20px;width:600px;padding-top:80px;margin-left:400px;}#oyj-menu ul li {color: #FFFFFF;float: left;font-size: 12px; padding:0; margin:0; list-style:none;}#oyj-menu ul {margin:0px auto 0px auto;padding:0; margin:0; float:right;}#oyj-tel {font-size:12px;color:#ffffff;height:20px;width:300pxpadding-top:50px;margin-left:700px;}#oyj-ul {line-height: 24px;list-style-type: none;background:#666;}#oyj-ul a {display: block;width: 80px;text-align:center;}#oyj-ul a:link {color:#ffffff;/*未点击时链接字体颜色*/text-decoration:none;}#oyj-ul a:visited {color:#FFFFff;text-decoration:none;}#oyj-ul a:hover {color:#FFFF00;text-decoration:none;font-weight:bold;}#oyj-ul li {float: left;width: 80px;background:#FF0099;/*主导航条背景*/}#oyj-ul li a:hover {background:#FF66CC;/*鼠标移位颜色*/}#oyj-ul li ul {line-height: 27px;list-style-type: none;text-align:left;left: -999em;width: 80px;position: absolute;}#oyj-ul li ul li {float: left;width: 100px;background: #000000;/*子菜单背景*/}#oyj-ul li ul a {display: block;width: 100px;text-align:center}#oyj-ul li ul a:link {color:#ffffff;text-decoration:none;}#oyj-ul li ul a:visited {color:#ffffff;text-decoration:none;}#oyj-ul li ul a:hover {color:#F3F3F3;text-decoration:none;font-weight:normal;background:#C00;}#oyj-ul li:hover ul {left: auto;}#oyj-ul li.sfhover ul {left: auto;}#content {clear: left;}--></style><script type=text/javascript><!--//--><![CDATA[//><!--function menuFix() {var sfEls = document.getElementById("oyj-ul").getElementsByTagName("li");for (var i=0; i<sfEls.length; i++) {sfEls[i].onmouseover=function() {this.className+=(this.className.length>0? " ": "") + "sfhover";}sfEls[i].onMouseDown=function() {this.className+=(this.className.length>0? " ": "") + "sfhover";}sfEls[i].onMouseUp=function() {this.className+=(this.className.length>0? " ": "") + "sfhover";}sfEls[i].onmouseout=function() {this.className=this.className.replace(new RegExp("( ?|^)sfhover\\b"),"");}}}window.onload=menuFix;//--><!]]></script><body><div id=oyj-header style="width: 100%; background-color:#000000; height:129px;"><div id=oyj-oyj-ul style="width:1000px; margin:0 auto;"><div id=oyj-ding><div id=oyj-huanying>*欢迎来到达诚网络,我们会用我们的真诚为您服务* 联系电话:11111111<div id=oyj-zhuce><a href="#" class="oyj-clj">登陆</a><a href="#" class="oyj-clj">注册</a></div><div align="right"></div></div></div><div id=oyj-ding2 style="width:1000px; height:109;"><div id=oyj-logo><img src="/static/imghw/default1.png" data-src="http://oyj424.ceshiyuming.yousn-cn.vip3237.net/1.png" class="lazy" style="max-width:90%" style="max-width:90%" / alt="哪位大侠给我支支招。。。_html/css_WEB-ITnose" ></div><div id=oyj-menu><ul id="oyj-ul"><li><a href="#">首页</a></li><li><a href="#">虚拟主机</a><ul><li><a href="#">国内主机</a></li><li><a href="#">香港主机</a></li><li><a href="#">美国主机</a></li></ul></li><li><a href="#">云VPS</a><ul><li><a href="#">国内云VPS</a></li><li><a href="#">香港云VPS</a></li><li><a href="#">美国云VPS</a></li></ul></li><li><a href="#">免费CDN</a></li><li><a href="#">服务器租用</a><ul><li><a href="#">国内服务器租用</a></li><li><a href="#">香港服务器租用</a></li><li><a href="#">美国服务器租用</a></li></ul></li><li><a href="#">帮助中心</a></li></ul></div></div></div></div></body></head>
改了两个地方:
1
#oyj-logo {
padding-top:10px;
margin-left:10px;
height:109px;
width:255px;
position:absolute;
zoom:1;
top:15px;
}
2
div id=oyj-ding2删除position:absolute

热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

Video Face Swap
使用我们完全免费的人工智能换脸工具轻松在任何视频中换脸!

热门文章

热工具

记事本++7.3.1
好用且免费的代码编辑器

SublimeText3汉化版
中文版,非常好用

禅工作室 13.0.1
功能强大的PHP集成开发环境

Dreamweaver CS6
视觉化网页开发工具

SublimeText3 Mac版
神级代码编辑软件(SublimeText3)

HTML适合初学者学习,因为它简单易学且能快速看到成果。1)HTML的学习曲线平缓,易于上手。2)只需掌握基本标签即可开始创建网页。3)灵活性高,可与CSS和JavaScript结合使用。4)丰富的学习资源和现代工具支持学习过程。

HTML定义网页结构,CSS负责样式和布局,JavaScript赋予动态交互。三者在网页开发中各司其职,共同构建丰富多彩的网站。

AnexampleOfAstartingTaginHtmlis,beginSaparagraph.startingTagSareEssentialInhtmlastheyInitiateEllements,defiteTheeTheErtypes,andarecrucialforsstructuringwebpages wepages webpages andConstructingthedom。

WebDevelovermentReliesonHtml,CSS和JavaScript:1)HTMLStructuresContent,2)CSSStyleSIT和3)JavaScriptAddSstractivity,形成thebasisofmodernWebemodernWebExexperiences。

网页批注功能的Y轴位置自适应算法本文将探讨如何实现类似Word文档的批注功能,特别是如何处理批注之间的间�...

GiteePages静态网站部署失败:404错误排查与解决在使用Gitee...

HTML、CSS和JavaScript是Web开发的三大支柱。1.HTML定义网页结构,使用标签如、等。2.CSS控制网页样式,使用选择器和属性如color、font-size等。3.JavaScript实现动态效果和交互,通过事件监听和DOM操作。

实现图片点击后周围图片散开并放大效果许多网页设计中,需要实现一种交互效果:点击某张图片,使其周围的...
