空间交流社区吧 关注:87,270贴子:955,633
  • 5回复贴,共1

★求教☆ 会CSS的朋友帮个忙。。关于鼠标。。

只看楼主收藏回复

咱想在鼠标后面添几个字符,可代码老是改不好。。
会改的朋友帮个忙吧^^

<style type="text/css">
.spanstyle {
COLOR: #00cccc; FONT-FAMILY: 宋体; FONT-SIZE: 10pt; POSITION: absolute; TOP: -50px; VISIBILITY: visible
}
</style>
<script>
var x,y
var step=18
var flag=0
var message="★守望蝴蝶"

message=message.split("")
var xpos=new Array()
for (i=0;i<=message.length-1;i++) {
xpos[i]=-50
}

var ypos=new Array()
for (i=0;i<=message.length-1;i++) {
ypos[i]=-200
}

function handlerMM(e){
x = (document.layers) ? e.pageX : document.body.scrollLeft+event.clientX
y = (document.layers) ? e.pageY : document.body.scrollTop+event.clientY
flag=1
}

function www_xise_cn() {
if (flag==1 && document.all) {
for (i=message.length-1; i>=1; i--) {
xpos[i]=xpos[i-1]+step
ypos[i]=ypos[i-1]
}
xpos[0]=x+step
ypos[0]=y

for (i=0; i<message.length-1; i++) {
var thisspan = eval("span"+(i)+".style")
thisspan.posLeft=xpos[i]
thisspan.posTop=ypos[i]
}
}

else if (flag==1 && document.layers) {
for (i=message.length-1; i>=1; i--) {
xpos[i]=xpos[i-1]+step
ypos[i]=ypos[i-1]
}
xpos[0]=x+step
ypos[0]=y

for (i=0; i<message.length-1; i++) {
var thisspan = eval("document.span"+i)
thisspan.left=xpos[i]
thisspan.top=ypos[i]
}
}
var timer=setTimeout("www_xise_cn()",30)
}

for (i=0;i<=message.length-1;i++) {
document.write("<span id='span"+i+"' class='spanstyle'>")
document.write(message[i])
document.write("</span>")
}

if (document.layers){
document.captureEvents(Event.MOUSEMOVE);
}
document.onmousemove = handlerMM;
www_xise_cn();
// -->
</script>
   




1楼2007-04-23 13:19回复
    - -


    2楼2007-04-23 19:11
    回复
      2025-07-02 19:59:12
      广告
      临沂新东方通讯有限公司(手机批发)http://hi.baidu.com/ljf13355071111
      临沂新东方通讯有限公司(手机批发)http://hi.baidu.com/ljf13355071111
      临沂新东方通讯有限公司(手机批发)http://hi.baidu.com/ljf13355071111
      临沂新东方通讯有限公司(手机批发)http://hi.baidu.com/ljf13355071111
      临沂新东方通讯有限公司(手机批发)http://hi.baidu.com/ljf13355071111
      临沂新东方通讯有限公司(手机批发)http://hi.baidu.com/ljf13355071111
      临沂新东方通讯有限公司(手机批发)http://hi.baidu.com/ljf13355071111
      临沂新东方通讯有限公司(手机批发)http://hi.baidu.com/ljf13355071111
      临沂新东方通讯有限公司(手机批发)http://hi.baidu.com/ljf13355071111
      临沂新东方通讯有限公司(手机批发)http://hi.baidu.com/ljf13355071111
      临沂新东方通讯有限公司(手机批发)http://hi.baidu.com/ljf13355071111
      临沂新东方通讯有限公司(手机批发)http://hi.baidu.com/ljf13355071111
      临沂新东方通讯有限公司(手机批发)http://hi.baidu.com/ljf13355071111
      临沂新东方通讯有限公司(手机批发)http://hi.baidu.com/ljf13355071111
      临沂新东方通讯有限公司(手机批发)http://hi.baidu.com/ljf13355071111
      临沂新东方通讯有限公司(手机批发)http://hi.baidu.com/ljf13355071111


      3楼2007-04-23 20:54
      回复
        CSS教程--百度空间个性代码
        http://hi.baidu.com/handword/blog/item/7f2fc4006ef59310738b652d.html

        谢霆锋被指沦为香港三流演员 无奈进军内地(图)
        http://hi.baidu.com/handword/blog/item/7a09ba51649edc8e8d543051.html

        《蜘蛛侠3》5月1日内地上映 比美国本土早两天
        http://hi.baidu.com/handword/blog/item/8d88170852b862d063d98625.html

        我的空间,请留下一言,谢谢!
        http://hi.baidu.com/handword


        4楼2007-04-23 23:02
        回复
          • 221.225.77.*
          D


          5楼2007-04-24 17:32
          回复
            • 58.49.232.*
            大家看看哈http://hi.baidu.com/lyf870920


            6楼2007-04-24 17:40
            回复