87,904
社区成员
发帖
与我相关
我的任务
分享
<html>
<head>
<title>
左右
</title>
</head>
<body>
<div style="position:absolute;top:0;left:0;width:w;height:100;background-color:blue"> *********
<marquee>
<img src="tx.jpg">
</marquee>
</div>
<div style="position:absolute;top:0;left:w;width:w;height:100;background-color:yellow"> *******
<marquee direction=right>
<img src="tx2.jpg">
</marquee>
</div>
<script>
var w=screen.availWidth;
w=w/2;
var h=screen.availHeight;
h=h/2;
</script>
</body>
</html>
<html>
<head>
<title>
左右
</title>
</head>
<body>
<div id="div1" style="position:absolute;top:0;left:0;width:w;height:100;background-color:blue"> *********
<marquee>
<img src="tx.jpg">
</marquee>
</div>
<div id="div2" style="position:absolute;top:0;background-color:yellow"> *******
<marquee direction=right>
<img src="tx2.jpg">
</marquee>
</div>
<script>
var w=screen.availWidth;
w=w/2;
var h=screen.availHeight;
h=h/2;
var ddd= document.getElementById("div2");
ddd.style.width=w;
ddd.style.height=h;
</script>
</body>
</html>