查看此帖的完整版本:网页CSS和弹出公告栏阅读 3722 次

作者:羽忆 2005/1/16 18:35:42

网页CSS和弹出公告栏

一。<!--

     a {text-decoration:none}

     a:hover {color: red;text-decoration:none}

    --!>

上面的代码加到<head></head>中,让你的链接的文字没有底线。

二。<style>

   .normal {color:red;}

   .start {color:blue;}

  </style>

  然后我们在要改变的字前后加上下面的代码:

  <SPAN onmouseover = "this.className = \'normal\'" 

   onmouseout = "this.className=\'start\'" class=start> here </SPAN>

上面的代码加上去,让你的连接文字在鼠标上去的时候变色。

三。下面的两种方法是弹出公告栏的。:

方法一:

在<head></head>之间插入如下一段JavaScript代码:

<script language="JavaScript">

<!--

var gt = unescape(\'%3e\');

var popup = null;

var over = "Launch Pop-up Navigator";

popup = window.open(\'\', \'popupnav\', \'width=200,height=170,resizable=0,scrollbars=auto,\');

if (popup != null) {

if (popup.opener == null) {

popup.opener = self;

}

popup.location.href = \'test.htm\';

}

// -->

</script>

方法二:

直接在<body>与</body>插入如下一段代码:

<script language="JavaScript">

  window.open("test.htm","测试公告窗口","width=340,height=163,toolbar=0,status=0,menubar=0,resize=0");

</script>

<marquee width=90%>

<a href="http://www.hongen.com/default.htm" target=_blank>带有超链接的跑马灯!点我试试?</a>

          <a href="http://www.hongen.com/pc/index.htm" target=_blank>还有一条呢!点我试试?</a>

</marquee>


分页:[1]