请问一下大佬为什么加完跑马灯之后字就没了?
<!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: #ff00000.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>
<selectname="spot">
<option value="foot">篮球</option>
<option value ="basketball">篮球</option>
</select>
</li>
<li>
<form action="" method="post">
<label>喜欢的篮球明星</label>
<selectname="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" >密 码:</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> 什么字没了? ba21 发表于 2022-4-7 19:09
什么字没了?
没加跑马灯特效时候是第一张图,加完之后就是第二张图那样了,有的字就没了 连基本的排版都没有排好。
<!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: #ff00000.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>
</div>
<div id="one">
<h1>个人介绍</h1>
<div id="first">
<p>个人爱好:</p>
<li>
<form action="" method="post">
<label>体育</label>
<selectname="spot">
<option value="foot">篮球</option>
<option value ="basketball">篮球</option>
</select>
</li>
<li>
<form action="" method="post">
<label>喜欢的篮球明星</label>
<selectname="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" >密 码:</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> 感谢大佬
页:
[1]