タイプライターもどき 上にあるやつそのまんま
幅。
文字の背景色。。
文字を表示させる速さ。
値が大きいほど遅くなりやし。。
<STYLE TYPE="text/css">
<!--
#saisyo { width:400px; background-color: white; }
--></STYLE>
<SCRIPT Language="JavaScript">
<!--
str = "因みに自分はbasicすら未だ解さない馬鹿です。";
str += "市販の本片手にオブジェクトとは何ぞや。";
str += "とかほざいています。故、あまりに独創性の無い物ばかり・・・。。";
str += "アミ○に通いた〜い(?)";
pStr = "";
count = 0;
function out1Char()
{
if ((count < str.length) && document.all)
{
pStr += str.charAt(count++);
saisyo.innerText = pStr;
setTimeout("out1Char()",150);
}
}
// -->
</SCRIPT>
</HEAD>
<BODY BGCOLOR="white" onLoad="out1Char()">
<font size="2" color="#808080">
<DIV ID="saisyo"></DIV>
逃げる魔王。 友達の開設祝いに…。
迷惑かけてます。。 こんな感じ。
<style type="text/css">
<!--
#myChar { position:absolute; top:200px; left:200px; }
--></style>
<SCRIPT Language="JavaScript">
<!--
function moveChar()
{
var oBODY = document.body;
var cx = myChar.style.posLeft;
var cy = myChar.style.posTop;
var sx = sgn(event.x,cx+100);
var sy = sgn(event.y,cy+100);
cx = cx + sx*4;
cy = cy + sy*4;
if (cx < 1) cx = 0;
if (cx > oBODY.clientWidth) cx = oBODY.clientWidth;
if (cy < 1) cy = 0;
if (cy > oBODY.clientHeight) cy = oBODY.clientHeight;
myChar.style.posLeft= cx;
myChar.style.posTop = cy;
}
function sgn(a,b)
{
if (a < b) return 1; else return -1;
}
if (document.all) document.onmousemove = moveChar;
// -->
</SCRIPT>
</head><body bgcolor="white"> 因みに画像は透明gif使ってます。<br> <img src="image/Maou.gif" ID="myChar" width="48" height="48">
背景を変えてみる マウスがのるとその文字の背景色が変わります。 スタイルシートでなんかでも出来るらしいが僕は<i>や<b> を使用しています。
<i onmouseover="this.style.background='black'"
onmouseout="this.style.background='white'">
<a href="redblood.htm">
<font size="2" color="#808080">
迷いの小道</a>/font></i>
座標掌の日々で使っている座標。。最初らへんで色々大きさとか変えられる見たいです。。
<STYLE TYPE="text/css">
<!--
#msxy { position:absolute;
top:0px;
left:0px;
width:48px;
color:white;
background-color:black;
font-size:15pt;
border-width:1px;
border-size:1px;
border-style:solid;
}
--></STYLE>
<SCRIPT Language="JavaScript">
<!--
function displayMouseXY(evt)
{
var X = Y = 0;
if (document.all)
{
X = event.x; Y = event.y; document.all["msxy"].innerText = X+","+Y;
document.all["msxy"].style.left= X + 8;
document.all["msxy"].style.top = Y + 16;
}
if (document.layers)
{
X = evt.x;
Y = evt.y;
with(document.layers["msxy"])
{
document.open();
document.write
("<SMALL>"+X+","+Y+"</SMALL>");
document.close();
left = X + 8;
top = Y + 16;
bgColor = "black";
}
}
}
if (document.all) document.onmousemove =
displayMouseXY;
if (document.layers) {
window.onmousemove = displayMouseXY;
window.captureEvents(Event.MOUSEMOVE);
}
// -->
</SCRIPT>
</HEAD>