Inhaltsverzeichnis
回复讨论(解决方案)
Heim Web-Frontend HTML-Tutorial 哪位大侠给我支支招。。。_html/css_WEB-ITnose

哪位大侠给我支支招。。。_html/css_WEB-ITnose

Jun 24, 2016 pm 12:22 PM

<!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>
Nach dem Login kopieren

在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;}
Nach dem Login kopieren

用你给的网页另存为改的:

<!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>
Nach dem Login kopieren

改了两个地方:
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

Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn

Heiße KI -Werkzeuge

Undresser.AI Undress

Undresser.AI Undress

KI-gestützte App zum Erstellen realistischer Aktfotos

AI Clothes Remover

AI Clothes Remover

Online-KI-Tool zum Entfernen von Kleidung aus Fotos.

Undress AI Tool

Undress AI Tool

Ausziehbilder kostenlos

Clothoff.io

Clothoff.io

KI-Kleiderentferner

Video Face Swap

Video Face Swap

Tauschen Sie Gesichter in jedem Video mühelos mit unserem völlig kostenlosen KI-Gesichtstausch-Tool aus!

Heiße Werkzeuge

Notepad++7.3.1

Notepad++7.3.1

Einfach zu bedienender und kostenloser Code-Editor

SublimeText3 chinesische Version

SublimeText3 chinesische Version

Chinesische Version, sehr einfach zu bedienen

Senden Sie Studio 13.0.1

Senden Sie Studio 13.0.1

Leistungsstarke integrierte PHP-Entwicklungsumgebung

Dreamweaver CS6

Dreamweaver CS6

Visuelle Webentwicklungstools

SublimeText3 Mac-Version

SublimeText3 Mac-Version

Codebearbeitungssoftware auf Gottesniveau (SublimeText3)

Ist HTML für Anfänger leicht zu lernen? Ist HTML für Anfänger leicht zu lernen? Apr 07, 2025 am 12:11 AM

HTML ist für Anfänger geeignet, da es einfach und leicht zu lernen ist und schnell Ergebnisse sehen kann. 1) Die Lernkurve von HTML ist glatt und leicht zu beginnen. 2) Beherrschen Sie einfach die grundlegenden Tags, um Webseiten zu erstellen. 3) hohe Flexibilität und kann in Kombination mit CSS und JavaScript verwendet werden. 4) Reiche Lernressourcen und moderne Tools unterstützen den Lernprozess.

Die Rollen von HTML, CSS und JavaScript: Kernverantwortung Die Rollen von HTML, CSS und JavaScript: Kernverantwortung Apr 08, 2025 pm 07:05 PM

HTML definiert die Webstruktur, CSS ist für Stil und Layout verantwortlich, und JavaScript ergibt eine dynamische Interaktion. Die drei erfüllen ihre Aufgaben in der Webentwicklung und erstellen gemeinsam eine farbenfrohe Website.

Was ist ein Beispiel für ein Start -Tag in HTML? Was ist ein Beispiel für ein Start -Tag in HTML? Apr 06, 2025 am 12:04 AM

AnexampleofaTartingTaginHtmlis, die, die starttagsaresesinginhtmlastheyinitiateElements, definetheirtypes, andarecrucialForstructuringwebpages und -konstruktionsthedoms.

HTML, CSS und JavaScript verstehen: Ein Anfängerhandbuch HTML, CSS und JavaScript verstehen: Ein Anfängerhandbuch Apr 12, 2025 am 12:02 AM

WebdevelopmentRelieSonHtml, CSS und JavaScript: 1) HtmlStructuresContent, 2) CSSstylesit und 3) JavaScriptaddssinteraktivität, Bildung von TheBasisofModerernwebexperiences.

Wie kann man adaptives Layout der Y-Achse-Position in Webanmerkungen implementieren? Wie kann man adaptives Layout der Y-Achse-Position in Webanmerkungen implementieren? Apr 04, 2025 pm 11:30 PM

Der ad-axis-Position adaptive Algorithmus für Webanmerkungen In diesem Artikel wird untersucht, wie Annotationsfunktionen ähnlich wie Word-Dokumente implementiert werden, insbesondere wie man mit dem Intervall zwischen Anmerkungen umgeht ...

Gitee Pages statische Website -Bereitstellung fehlgeschlagen: Wie können Sie einzelne Dateien 404 Fehler beheben und beheben? Gitee Pages statische Website -Bereitstellung fehlgeschlagen: Wie können Sie einzelne Dateien 404 Fehler beheben und beheben? Apr 04, 2025 pm 11:54 PM

GitePages statische Website -Bereitstellung fehlgeschlagen: 404 Fehlerbehebung und Auflösung bei der Verwendung von Gitee ...

Wie verwendet ich CSS3 und JavaScript, um den Effekt der Streuung und Vergrößerung der umgebenden Bilder nach dem Klicken zu erreichen? Wie verwendet ich CSS3 und JavaScript, um den Effekt der Streuung und Vergrößerung der umgebenden Bilder nach dem Klicken zu erreichen? Apr 05, 2025 am 06:15 AM

Um den Effekt der Streuung und Vergrößerung der umgebenden Bilder nach dem Klicken auf das Bild zu erreichen, müssen viele Webdesigns einen interaktiven Effekt erzielen: Klicken Sie auf ein bestimmtes Bild, um die Umgebung zu machen ...

HTML, CSS und JavaScript: Wesentliche Tools für Webentwickler HTML, CSS und JavaScript: Wesentliche Tools für Webentwickler Apr 09, 2025 am 12:12 AM

HTML, CSS und JavaScript sind die drei Säulen der Webentwicklung. 1. HTML definiert die Webseitenstruktur und verwendet Tags wie z.

See all articles