鱼C论坛

 找回密码
 立即注册
查看: 2263|回复: 4

[已解决]请问一下大佬为什么加完跑马灯之后字就没了?

[复制链接]
发表于 2022-4-7 17:40:19 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
<!DOCTYPE html>
<html>
        <head>
                <meta charset="utf-8">
                <title></title>
                <script type="text/javascript">
                  var msg="1167889765333"   //跑马灯文字
                  var interval=400;                                               //跑动的速度
                  var seq=0;
                  function txtScroll(){                                             //定义函数
                   document.ScrollForm.txtText.value=msg.substring(seq,msg.length)+""+msg;
                   seq++;
                   if(seq>msg.length)
                   seq=0;
                   window.setTimeout("txtScroll();",interval);
                  }
                  </script>
                  <style type="text/css" >
       
               
                        h1{
                                text-align: center;
                        }
                        #img{
                                position:relative;
                        }
                        #one{
                                background-color: #f7dac9;
                                height: 700px;
                                width: 800px;
                                padding: 10px 0 0 0;
                                margin: auto;
                        }
                        #first {
                                width:400px;
                                height: 200px;
                                position: relative;
                                left: 0px;
                                border: #ff557f 0.125rem solid;
                                background-color:#DEB887;
                        }
                        #tow {
                                border: #ffffff 0.125rem solid ;
                                background-color: #DEB887;
                                width:380px;
                                height: 200px;
                                position: relative;
                                left: 415px;
                                bottom: 205px;
                                text-align: center;
                        }
                        #plan {
                                background-color: #ffffff;
                                width: 600px;
                                height: 300px;
                                border: #ff0000  0.125rem solid;
                                position: relative;
                                bottom: 180px;
                                left: 100px;
                               
                                text-align: center;
                        }
                #down{
                        font-size: 30px;
                        background-color:  #999999;
                        color: #FFFFFF;
                        height: 50px;
                        width: 800px;
                        position: relative;
                        bottom: 150px;
                        text-align: center;
                }
                #one #three{
                        position: relative;
                        bottom: 150px;
                        left: 190px;
                }
                        li{
                                list-style: none;
                                line-height: 50px;
                                }
                                #goodnews
                                      {
                                       background-color:#ffff00;
                                       width:200px;
                                       height:300px;
                                       line-height:25px;
                                       padding-top:5px;
                                       font-size: 0px;
                                       position:relative;
                                       bottom:10px;
                                       float: left;
                                       
                  }
                                      #af{
                                     background-color: transparent;
                                     border: none;
                                         }
                                  </style>
                                 </head>
                                <body onload="txtScroll()">
                                      <div id="one">
                                       <h1>36 马子涵 个人介绍</h1>
                                       <div id="goodnews">
                                         <center><form id="from1" name="ScrollForm" method="post" action="">
                                           <label for="textfield"></label>
                                           <input name="txtText" type="text" id="af" size="100" />
                                         </form></center>
                                 
          <div id="one">
           <h1>个人介绍</h1>
                 <div id="first">
                                <p>个人爱好:</p>
                                <li>
                                <form action="" method="post">
                                                <label>体育</label>
                                <select  name="spot">
                                        <option value="foot">篮球</option>
                                        <option value ="basketball">篮球</option>
                                </select>
                                </li>
                                <li>
                                <form action="" method="post">
                                <label>喜欢的篮球明星</label>
                                <select  name="spot">
                                        <option value="foot">James</option>
                                        <option value ="basketball">kobe</option>
                                        <option value ="ping" selected>lverson</option>
                                </select></li>
                                <div id="three" ><img src="2/2.jpg.jpg" width="200px" height="200px"></div>
                </div>
                        <div id="tow">
                                        <li>
                                                <label for="memberID" >用户名:</label>
                                                <input name="username" type="text"class="text">
                                        </li>
                                        <li>
                                                <label for="memberID" >密&nbsp;&nbsp;&nbsp;码:</label>
                                                <input name="username" type="text"class="text">
                                        </li>
                                        <li>
                                        <input type="submit" value="确定">
                                                <input type="reset" value="取消">
                                        </li>
                        </div>
                        <div id="plan">
                                <h1>个人计划</h1>
                        </div>
        <div id="down">
                                <span>版权维护:辽宁理工职业大学</span>
                        </div>
                       
                </div>       
        </body>
</html>
最佳答案
2022-4-8 10:39:48
连基本的排版都没有排好。

  1. <!DOCTYPE html>
  2. <html>
  3.         <head>
  4.                 <meta charset="utf-8">
  5.                 <title></title>
  6.                 <script type="text/javascript">
  7.                   var msg="1167889765333"   //跑马灯文字
  8.                   var interval=400;                                               //跑动的速度
  9.                   var seq=0;
  10.                   function txtScroll(){                                             //定义函数
  11.                    document.ScrollForm.txtText.value=msg.substring(seq,msg.length)+""+msg;
  12.                    seq++;
  13.                    if(seq>msg.length)
  14.                    seq=0;
  15.                    window.setTimeout("txtScroll();",interval);
  16.                   }
  17.                   </script>
  18.                   <style type="text/css" >
  19.       
  20.                
  21.                         h1{
  22.                                 text-align: center;
  23.                         }
  24.                         #img{
  25.                                 position:relative;
  26.                         }
  27.                         #one{
  28.                                 background-color: #f7dac9;
  29.                                 height: 700px;
  30.                                 width: 800px;
  31.                                 padding: 10px 0 0 0;
  32.                                 margin: auto;
  33.                         }
  34.                         #first {
  35.                                 width:400px;
  36.                                 height: 200px;
  37.                                 position: relative;
  38.                                 left: 0px;
  39.                                 border: #ff557f 0.125rem solid;
  40.                                 background-color:#DEB887;
  41.                         }
  42.                         #tow {
  43.                                 border: #ffffff 0.125rem solid ;
  44.                                 background-color: #DEB887;
  45.                                 width:380px;
  46.                                 height: 200px;
  47.                                 position: relative;
  48.                                 left: 415px;
  49.                                 bottom: 205px;
  50.                                 text-align: center;
  51.                         }
  52.                         #plan {
  53.                                 background-color: #ffffff;
  54.                                 width: 600px;
  55.                                 height: 300px;
  56.                                 border: #ff0000  0.125rem solid;
  57.                                 position: relative;
  58.                                 bottom: 180px;
  59.                                 left: 100px;
  60.                               
  61.                                 text-align: center;
  62.                         }
  63.                 #down{
  64.                         font-size: 30px;
  65.                         background-color:  #999999;
  66.                         color: #FFFFFF;
  67.                         height: 50px;
  68.                         width: 800px;
  69.                         position: relative;
  70.                         bottom: 150px;
  71.                         text-align: center;
  72.                 }
  73.                 #one #three{
  74.                         position: relative;
  75.                         bottom: 150px;
  76.                         left: 190px;
  77.                 }
  78.                         li{
  79.                                 list-style: none;
  80.                                 line-height: 50px;
  81.                                 }
  82.                                 #goodnews
  83.                                       {
  84.                                        background-color:#ffff00;
  85.                                        width:200px;
  86.                                        height:300px;
  87.                                        line-height:25px;
  88.                                        padding-top:5px;
  89.                                        font-size: 0px;
  90.                                        position:relative;
  91.                                        bottom:10px;
  92.                                        float: left;
  93.                                        
  94.                   }
  95.                                       #af{
  96.                                      background-color: transparent;
  97.                                      border: none;
  98.                                          }
  99.                                   </style>
  100.                                  </head>
  101.                                 <body onload="txtScroll()">
  102.                                       <div id="one">
  103.                                        <h1>36 马子涵 个人介绍</h1>
  104.                                        <div id="goodnews">
  105.                                          <center>
  106.                                          <form id="from1" name="ScrollForm" method="post" action="">
  107.                                            <label for="textfield"></label>
  108.                                            <input name="txtText" type="text" id="af" size="100" />
  109.                                          </form>
  110.                                          </center>
  111.                                          </div>
  112.                                          </div>
  113.                                  
  114.           <div id="one">
  115.            <h1>个人介绍</h1>
  116.                  <div id="first">
  117.                                 <p>个人爱好:</p>
  118.                                 <li>
  119.                                 <form action="" method="post">
  120.                                                 <label>体育</label>
  121.                                 <select  name="spot">
  122.                                         <option value="foot">篮球</option>
  123.                                         <option value ="basketball">篮球</option>
  124.                                 </select>
  125.                                 </li>
  126.                                 <li>
  127.                                 <form action="" method="post">
  128.                                 <label>喜欢的篮球明星</label>
  129.                                 <select  name="spot">
  130.                                         <option value="foot">James</option>
  131.                                         <option value ="basketball">kobe</option>
  132.                                         <option value ="ping" selected>lverson</option>
  133.                                 </select></li>
  134.                                 <div id="three" ><img src="2/2.jpg.jpg" width="200px" height="200px"></div>
  135.                 </div>
  136.                         <div id="tow">
  137.                                         <li>
  138.                                                 <label for="memberID" >用户名:</label>
  139.                                                 <input name="username" type="text"class="text">
  140.                                         </li>
  141.                                         <li>
  142.                                                 <label for="memberID" >密&nbsp;&nbsp;&nbsp;码:</label>
  143.                                                 <input name="username" type="text"class="text">
  144.                                         </li>
  145.                                         <li>
  146.                                         <input type="submit" value="确定">
  147.                                                 <input type="reset" value="取消">
  148.                                         </li>
  149.                         </div>
  150.                         <div id="plan">
  151.                                 <h1>个人计划</h1>
  152.                         </div>
  153.         <div id="down">
  154.                                 <span>版权维护:辽宁理工职业大学</span>
  155.                         </div>
  156.                        
  157.                 </div>      
  158. </body>
  159. </html>
复制代码
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2022-4-7 19:09:41 | 显示全部楼层
什么字没了?
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2022-4-8 07:27:17 From FishC Mobile | 显示全部楼层
ba21 发表于 2022-4-7 19:09
什么字没了?

没加跑马灯特效时候是第一张图,加完之后就是第二张图那样了,有的字就没了
2EDC5318-8DB9-4FB0-8596-81ECB7033BF0.jpeg
751CD0FC-6E04-4C78-88E9-C48E1700CDA5.jpeg
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-4-8 10:39:48 | 显示全部楼层    本楼为最佳答案   
连基本的排版都没有排好。

  1. <!DOCTYPE html>
  2. <html>
  3.         <head>
  4.                 <meta charset="utf-8">
  5.                 <title></title>
  6.                 <script type="text/javascript">
  7.                   var msg="1167889765333"   //跑马灯文字
  8.                   var interval=400;                                               //跑动的速度
  9.                   var seq=0;
  10.                   function txtScroll(){                                             //定义函数
  11.                    document.ScrollForm.txtText.value=msg.substring(seq,msg.length)+""+msg;
  12.                    seq++;
  13.                    if(seq>msg.length)
  14.                    seq=0;
  15.                    window.setTimeout("txtScroll();",interval);
  16.                   }
  17.                   </script>
  18.                   <style type="text/css" >
  19.       
  20.                
  21.                         h1{
  22.                                 text-align: center;
  23.                         }
  24.                         #img{
  25.                                 position:relative;
  26.                         }
  27.                         #one{
  28.                                 background-color: #f7dac9;
  29.                                 height: 700px;
  30.                                 width: 800px;
  31.                                 padding: 10px 0 0 0;
  32.                                 margin: auto;
  33.                         }
  34.                         #first {
  35.                                 width:400px;
  36.                                 height: 200px;
  37.                                 position: relative;
  38.                                 left: 0px;
  39.                                 border: #ff557f 0.125rem solid;
  40.                                 background-color:#DEB887;
  41.                         }
  42.                         #tow {
  43.                                 border: #ffffff 0.125rem solid ;
  44.                                 background-color: #DEB887;
  45.                                 width:380px;
  46.                                 height: 200px;
  47.                                 position: relative;
  48.                                 left: 415px;
  49.                                 bottom: 205px;
  50.                                 text-align: center;
  51.                         }
  52.                         #plan {
  53.                                 background-color: #ffffff;
  54.                                 width: 600px;
  55.                                 height: 300px;
  56.                                 border: #ff0000  0.125rem solid;
  57.                                 position: relative;
  58.                                 bottom: 180px;
  59.                                 left: 100px;
  60.                               
  61.                                 text-align: center;
  62.                         }
  63.                 #down{
  64.                         font-size: 30px;
  65.                         background-color:  #999999;
  66.                         color: #FFFFFF;
  67.                         height: 50px;
  68.                         width: 800px;
  69.                         position: relative;
  70.                         bottom: 150px;
  71.                         text-align: center;
  72.                 }
  73.                 #one #three{
  74.                         position: relative;
  75.                         bottom: 150px;
  76.                         left: 190px;
  77.                 }
  78.                         li{
  79.                                 list-style: none;
  80.                                 line-height: 50px;
  81.                                 }
  82.                                 #goodnews
  83.                                       {
  84.                                        background-color:#ffff00;
  85.                                        width:200px;
  86.                                        height:300px;
  87.                                        line-height:25px;
  88.                                        padding-top:5px;
  89.                                        font-size: 0px;
  90.                                        position:relative;
  91.                                        bottom:10px;
  92.                                        float: left;
  93.                                        
  94.                   }
  95.                                       #af{
  96.                                      background-color: transparent;
  97.                                      border: none;
  98.                                          }
  99.                                   </style>
  100.                                  </head>
  101.                                 <body onload="txtScroll()">
  102.                                       <div id="one">
  103.                                        <h1>36 马子涵 个人介绍</h1>
  104.                                        <div id="goodnews">
  105.                                          <center>
  106.                                          <form id="from1" name="ScrollForm" method="post" action="">
  107.                                            <label for="textfield"></label>
  108.                                            <input name="txtText" type="text" id="af" size="100" />
  109.                                          </form>
  110.                                          </center>
  111.                                          </div>
  112.                                          </div>
  113.                                  
  114.           <div id="one">
  115.            <h1>个人介绍</h1>
  116.                  <div id="first">
  117.                                 <p>个人爱好:</p>
  118.                                 <li>
  119.                                 <form action="" method="post">
  120.                                                 <label>体育</label>
  121.                                 <select  name="spot">
  122.                                         <option value="foot">篮球</option>
  123.                                         <option value ="basketball">篮球</option>
  124.                                 </select>
  125.                                 </li>
  126.                                 <li>
  127.                                 <form action="" method="post">
  128.                                 <label>喜欢的篮球明星</label>
  129.                                 <select  name="spot">
  130.                                         <option value="foot">James</option>
  131.                                         <option value ="basketball">kobe</option>
  132.                                         <option value ="ping" selected>lverson</option>
  133.                                 </select></li>
  134.                                 <div id="three" ><img src="2/2.jpg.jpg" width="200px" height="200px"></div>
  135.                 </div>
  136.                         <div id="tow">
  137.                                         <li>
  138.                                                 <label for="memberID" >用户名:</label>
  139.                                                 <input name="username" type="text"class="text">
  140.                                         </li>
  141.                                         <li>
  142.                                                 <label for="memberID" >密&nbsp;&nbsp;&nbsp;码:</label>
  143.                                                 <input name="username" type="text"class="text">
  144.                                         </li>
  145.                                         <li>
  146.                                         <input type="submit" value="确定">
  147.                                                 <input type="reset" value="取消">
  148.                                         </li>
  149.                         </div>
  150.                         <div id="plan">
  151.                                 <h1>个人计划</h1>
  152.                         </div>
  153.         <div id="down">
  154.                                 <span>版权维护:辽宁理工职业大学</span>
  155.                         </div>
  156.                        
  157.                 </div>      
  158. </body>
  159. </html>
复制代码
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2022-4-8 18:15:32 | 显示全部楼层
感谢大佬
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-5-18 11:41

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表