哪位大侠给我支支招。。。_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

Alat AI Hot

Undresser.AI Undress
Apl berkuasa AI untuk mencipta foto bogel yang realistik

AI Clothes Remover
Alat AI dalam talian untuk mengeluarkan pakaian daripada foto.

Undress AI Tool
Gambar buka pakaian secara percuma

Clothoff.io
Penyingkiran pakaian AI

Video Face Swap
Tukar muka dalam mana-mana video dengan mudah menggunakan alat tukar muka AI percuma kami!

Artikel Panas

Alat panas

Notepad++7.3.1
Editor kod yang mudah digunakan dan percuma

SublimeText3 versi Cina
Versi Cina, sangat mudah digunakan

Hantar Studio 13.0.1
Persekitaran pembangunan bersepadu PHP yang berkuasa

Dreamweaver CS6
Alat pembangunan web visual

SublimeText3 versi Mac
Perisian penyuntingan kod peringkat Tuhan (SublimeText3)

Topik panas

HTML sesuai untuk pemula kerana mudah dan mudah dipelajari dan dapat melihat hasilnya dengan cepat. 1) Keluk pembelajaran HTML adalah lancar dan mudah dimulakan. 2) Hanya menguasai tag asas untuk mula membuat laman web. 3) Fleksibiliti yang tinggi dan boleh digunakan dalam kombinasi dengan CSS dan JavaScript. 4) Sumber pembelajaran yang kaya dan alat moden menyokong proses pembelajaran.

HTML mentakrifkan struktur web, CSS bertanggungjawab untuk gaya dan susun atur, dan JavaScript memberikan interaksi dinamik. Ketiga melaksanakan tugas mereka dalam pembangunan web dan bersama -sama membina laman web yang berwarna -warni.

Anexampleofastartartingtaginhtmlis, yangbeginsaparagraph.startingtagsareessentialinhtmlasttheyinitiateelements, definetheirtypes, andarecrucialforstructuringwebpagesandconstructionthedom.

WebDevelopmentReliesOnhtml, CSS, andjavascript: 1) HtmlStructuresContent, 2) CSSStylesit, dan3) JavaScriptaddsInteractivity, Formingthebasisofmodernwebexperiences.

Giteepages Statik Laman Web Penggunaan Gagal: 404 Penyelesaian Masalah dan Resolusi Ralat Semasa Menggunakan Gitee ...

Algoritma Adaptif Kedudukan Y-Axis untuk Fungsi Anotasi Web Artikel ini akan meneroka cara melaksanakan fungsi anotasi yang serupa dengan dokumen perkataan, terutama bagaimana menangani selang antara anotasi ...

Untuk mencapai kesan penyebaran dan membesarkan imej sekitarnya selepas mengklik pada imej, banyak reka bentuk web perlu mencapai kesan interaktif: klik pada imej tertentu untuk membuat sekitar ...

HTML, CSS dan JavaScript adalah tiga tiang pembangunan web. 1. HTML mentakrifkan struktur laman web dan menggunakan tag seperti, dan sebagainya. 2. CSS mengawal gaya laman web, menggunakan pemilih dan atribut seperti warna, saiz font, dan lain-lain.
