raksmart活动促销

分享

写回答

发帖

求助 htm问题

互联网出海创业 互联网出海创业 5695 人阅读 | 15 人回复

发表于 2008-5-17 20:18:30 | 显示全部楼层 |阅读模式

我的博客首页导航栏浏览器顶上与产生分离! 我需要的不是这种效果!

原本很好,但是一加上背景图片就是产生这种分离效果

首页源文件

头部部分
  1. <html><head><meta http-equiv=Content-Type content="text/html;charset=gb2312"><title>雪深的blog  -------那年雪下的很深</title>
  2. <meta name="keywords" content="各种音效,经典网页背景音乐,网页素材下载,flash欣赏下载,建站源码,网站建设技术,风景flash,flash模板,古典美女电脑技术,">
  3. <meta name="description" content="素材下载,flash欣赏下载,建站源码,电脑技术,建站交流,各种音效">
  4.    </head>
复制代码
导航栏代码
  1.     <style type="text/css">
  2. <!--
  3. body {
  4.         background: #FFF;
  5.         color: #000;
  6.         font: 12px Verdana, Arial, Helvetica, sans-serif;
  7.         margin: 0;
  8.         padding: 0;
  9. }
  10. a:link, a:visited {
  11.         color: #FF2A84;
  12.         text-decoration: underline;
  13. }
  14. a:hover, a:active {
  15.         color: #FFF;
  16.         text-decoration: none;
  17.         background: #FF2A84;
  18. }
  19. #navigation {
  20.         background: #DDD;
  21.         border-bottom: 1px solid #A1A1A1;
  22.         margin: 1em 0 0;
  23.         padding: 0.6em 0 0;
  24.         font-weight: bold;
  25. }
  26. #navigation ul, #navigation ul li {
  27.         list-style: none;
  28.         margin: 0;
  29.         padding: 0;
  30. }
  31. #navigation ul {
  32.         padding: 5px 0 5px;
  33.         text-align: center;
  34. }
  35. #navigation ul li {
  36.         display: inline;
  37. }
  38. #navigation ul li a {
  39.         background: url(tableft.gif) no-repeat left top;
  40.         color: #FFF;
  41.         text-decoration: none;
  42.         padding: 5px 0;
  43. }
  44. #navigation ul li span {
  45.         background: url(tabright.gif) no-repeat right top;
  46.         padding: 5px 7px 5px 3px;
  47.         margin: 4px 0 4px 4px;
  48. }
  49. #navigation ul li a:hover span {
  50.         text-decoration: underline;
  51.         background-position: 100% -75px;
  52. }
  53. #navigation ul li a:hover {
  54.         background-position: 0 -75px;
  55. }
  56. #navigation #current a {
  57.         background-position: 0 -150px;
  58. }
  59. #navigation #current a span {
  60.         background-position: 100% -150px;
  61. }


  62. /*- Internet Explorer...It's Hacktastic!--------------------------- */

  63. /*\*//*/
  64. #navigation ul li a {
  65.         display: inline-block;
  66.         white-space: nowrap;
  67.         width: 1px;
  68. }

  69. #navigation ul {
  70.         padding-bottom: 0;
  71.         margin-bottom: -1px;
  72. }
  73. /**/

  74. /*\*/
  75. * html #navigation ul li a {
  76.         padding: 0;
  77. }
  78. /**/
  79. -->
  80. </style>
  81.         </head>

  82.         <body>
  83.                 <div id="navigation">
  84.                         <ul>
  85.                                 <!-- CSS Tabs -->

  86. <li><a href="index.htm"><span>首页</span></a></li>
  87. <li><a href="xueshen/xinwen.htm"><span>新闻</span></a></li>
  88. <li><a href="xueshen/rizhi.htm"><span>日志</span></a></li>
  89. <li><a href="xueshen/tupian.htm"><span>图片</span></a></li>
  90. <li id="current"><a href="xueshen/shipin.htm"><span>视频</span></a></li>
  91. <li><a href="xueshen/shenghuo.htm"><span>生活</span></a></li>
  92. <li><a href="logo"><span>邮箱logo制作</span></a></li>
  93. <li><a href="xueshen/sucai"><span>素材下载</span></a></li>
  94. <li><a href="xueshen/ruanjian"><span></span>源码下载</a></li>
  95. <li><a href="xueshen/youqing.htm"><span>友情连接</span></a></li>
  96. <li><a href="xueshen/qita.htm"><span>其它</span></a></li>
  97. <li><a href="xueshen/liuyan"><span>给我留言</span></a></li>
  98. <li><a href="xueshen/mingyan"><span>很多名言 </span></a></li>

  99.                         </ul>
  100.                 </div>
  101.         </body>
复制代码
js特效边框
  1. <script language="JavaScript1.2">
  2. if (document.all)
  3. document.body.style.cssText="border:25 ridge off-white"
  4. </script>
复制代码

回答|共 15 个

潜水学习

发表于 2008-5-17 20:19:59 | 显示全部楼层

雪景特效js
  1. <script language="JavaScript">
  2. <!--

  3. Amount=20; //Smoothness! depends on image file size, the smaller the size the more you can use!

  4. //Pre-load your image below!
  5. Image0=new Image();
  6. Image0.src="sto/flake1.gif";
  7. Image1=new Image();
  8. Image1.src="sto/flake2.gif";
  9. Image2=new Image();
  10. Image2.src="sto/flake3.gif";
  11. Image3=new Image();
  12. Image3.src="sto/flake4.gif";
  13. Image4=new Image();
  14. Image4.src="sto/flake5.gif";

  15. grphcs=new Array(5)
  16. grphcs[0]="xueshen/xuehua/1.gif"
  17. grphcs[1]="xueshen/xuehua/2.gif"
  18. grphcs[2]="xueshen/xuehua/3.gif"
  19. grphcs[3]="xueshen/xuehua/4.gif"
  20. grphcs[4]="xueshen/xuehua/5.gif"

  21. Ypos=new Array();
  22. Xpos=new Array();
  23. Speed=new Array();
  24. Step=new Array();
  25. Cstep=new Array();
  26. ns=(document.layers)?1:0;
  27. if (ns){
  28. for (i = 0; i < Amount; i++){
  29. var P=Math.floor(Math.random()*grphcs.length);
  30. rndPic=grphcs[P];
  31. document.write("<LAYER NAME='sn"+i+"' LEFT=0 TOP=0><img src="+rndPic+"></LAYER>");
  32. }
  33. }
  34. else{
  35. document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
  36. for (i = 0; i < Amount; i++){
  37. var P=Math.floor(Math.random()*grphcs.length);
  38. rndPic=grphcs[P];
  39. document.write('<img id="si" src="'+rndPic+'" style="position:absolute;top:0px;left:0px">');
  40. }
  41. document.write('</div></div>');
  42. }
  43. WinHeight=(document.layers)?window.innerHeight:window.document.body.clientHeight;
  44. WinWidth=(document.layers)?window.innerWidth:window.document.body.clientWidth;
  45. for (i=0; i < Amount; i++){                                                               
  46. Ypos[i] = Math.round(Math.random()*WinHeight);
  47. Xpos[i] = Math.round(Math.random()*WinWidth);
  48. Speed[i]= Math.random()*3+2;
  49. Cstep[i]=0;
  50. Step[i]=Math.random()*0.1+0.05;
  51. }
  52. function fall(){
  53. var WinHeight=(document.layers)?window.innerHeight:window.document.body.clientHeight;
  54. var WinWidth=(document.layers)?window.innerWidth:window.document.body.clientWidth;
  55. var hscrll=(document.layers)?window.pageYOffset:document.body.scrollTop;
  56. var wscrll=(document.layers)?window.pageXOffset:document.body.scrollLeft;
  57. for (i=0; i < Amount; i++){
  58. sy = Speed[i]*Math.sin(90*Math.PI/180);
  59. sx = Speed[i]*Math.cos(Cstep[i]);
  60. Ypos[i]+=sy;
  61. Xpos[i]+=sx;
  62. if (Ypos[i] > WinHeight){
  63. Ypos[i]=-60;
  64. Xpos[i]=Math.round(Math.random()*WinWidth);
  65. Speed[i]=Math.random()*5+2;
  66. }
  67. if (ns){
  68. document.layers['sn'+i].left=Xpos[i];
  69. document.layers['sn'+i].top=Ypos[i]+hscrll;
  70. }
  71. else{
  72. si[i].style.pixelLeft=Xpos[i];
  73. si[i].style.pixelTop=Ypos[i]+hscrll;
  74. }
  75. Cstep[i]+=Step[i];
  76. }
  77. setTimeout('fall()',10);
  78. }
  79. fall();
  80. //-->
  81. </script>
复制代码
滚动文字代码
  1. <marquee scrollAmount=1 width=400 height=320 direction=up>
  2. <font color="#000" size="4"><strong>&nbsp; 雪韵</strong></font>


  3. <font color="#000" size="4"><strong>&nbsp; 我不能够知道
  4. &nbsp; 你是否喜欢春天
  5. &nbsp; 我也不能够知晓
  6. &nbsp; 你是否钟情于我
  7. &nbsp; 如果真的愿意
  8. &nbsp; 就请飘飘而下吧
  9. &nbsp; 我          
  10. &nbsp; 正立于自信张开热情
  11. &nbsp; 静静聆听你的倾诉</strong></font>


  12. <font color="#000" size="4"><strong>&nbsp; 既然大地尚有冰封区
  13. &nbsp; 就请铺下倾地棉床
  14. &nbsp; 既然春天还需要滋润
  15. &nbsp; 就请降雪乳以哺胚根
  16. &nbsp; 既然道路还不那么平坦
  17. &nbsp; 就请覆盖所有的崎岖
  18. &nbsp; 既然天空还不那么透明
  19. &nbsp; 就请涤去入眼的尘埃
  20. &nbsp; 既然我的身上或多或少会有污点
  21. &nbsp; 就请浸透我的灵魂
  22. &nbsp; 既然你有那么多的人迷恋
  23. &nbsp; 既然你已经飘落下来了
  24. &nbsp; 就连骚客们都愿意缀你入诗 </strong></font>
  25. </a></marquee>
复制代码

潜水学习

发表于 2008-5-17 20:21:40 | 显示全部楼层

背景图片代码
  1. <TABLE width="100%">
  2. <TBODY>
  3. <TR>
  4. <TD class=ArticleTitle align=left>
  5. <DIV id=divTitle style="FONT-SIZE: 30px"><B></B>&nbsp;</DIV></TD></TR>
  6. <TR>
  7. <TD class=ArticleContent style="FONT-SIZE: 30px; LINE-HEIGHT: 150%" align=left>
  8. <CENTER>&nbsp;</CENTER>
  9. <STYLE type=text/css><!--body {background-image:url(bg.jpg);background-repeat:no-repeat;background-attachment:fixed;background-position:50% 50%}</STYLE>
  10. </TD></TR></TBODY></TABLE></SPAN>  
复制代码
效果可以在www.bbslianmeng.net看见!如果产生这样的分离效果  很难看

潜水学习

发表于 2008-5-17 20:24:08 | 显示全部楼层

那位高手能给我解决吗

bingu

发表于 2008-5-17 21:41:11 | 显示全部楼层

哈哈,知道不好看了吧。

潜水学习

发表于 2008-5-17 22:09:45 | 显示全部楼层

回复 5# 的帖子

还说风凉话
给我个解决的办法吧

bingu

发表于 2008-5-18 01:39:18 | 显示全部楼层

太乱了,我搞不定。

zerty

发表于 2008-5-18 15:51:39 | 显示全部楼层

z

#navigation {
        background: #DDD;
        border-bottom: 1px solid #A1A1A1;
        margin: 1em 0 0;
        padding: 0.6em 0 0;
        font-weight: bold;
}

把红的地方改成一个0

评分

参与人数 1威望 +5 收起 理由
潜水学习 + 5 精品文章

查看全部评分

潜水学习

发表于 2008-5-18 17:05:52 | 显示全部楼层

感谢.........................

bingu

发表于 2008-5-24 21:25:59 | 显示全部楼层

哈哈,怎么用上bo-blog了啊
您需要登录后才可以回帖 登录 | 注册

本版积分规则