body {
text-align:center;
background-repeat: repeat-y;
background-position: center;
background-image: url(../images/bg.jpg);
}
34、划过链接 手型鼠标
style="cursor:hand"
35、如何关闭层
<div id="Layer1"></div>
<a href="#" onClick="Layer1.style.display='none'">关闭层</a>
36、关闭窗口的脚本
<a href=javascript:close()>[关闭窗口]</a>
37、如果文字过长,则将过长的部分变成省略号显示
<DIV STYLE="width: 120px; height: 50px; border: 1px solid blue;overflow: hidden; text-overflow:ellipsis">
<NOBR>就是比如有一行文字,很长,表格内一行显示不下.</NOBR>
</DIV>
38、进入主页后自动最大化
<script>
self.moveTo(0,0)
self.resizeTo(screen.availWidth,screen.availHeight)
</script>
39、凹陷文字
<div style="width:300px;padding:20px;overflow:hidden;word-wrap:break-word;word-break:break:all; font-size:12px; line-height:18px; background-color:#eeeeee;">
<font disabled>
怎么样,我凹下去了吧?<br>
你不想试试吗?<br>
<a href="http://www.lenvo.cn/%22%3Ewww.lenvo.cn%3C/a%3E%3C/font>
</div>
40、运行代码框
<script>
function Preview()
{var TestWin=open('');
TestWin.document.write(code.value);}
</script>
<textarea id=code cols=60 rows=15></textarea>
<br>
<button onclick=Preview() >运行</button>
41、给表格做链接
<table width="100%" onclick="window.open('http://www.makewing.com/', '_blank')" style="CURSOR:hand">
<tr>
<td height="100" bgcolor="f4f4f4"> </td>
</tr>
</table>
42、让弹出窗口总是在最上面
<body onblur="this.focus();">
43、CSS文字阴影
.shadowfont{FILTER: dropshadow(color=#666666, offx=1, offy=1, positive=1); FONT-FAMILY: "宋体"; FONT-SIZE: 9pt;COLOR: #ffffff;}
44、后退&关闭窗口
后退:javascript:history.back(1)
关闭:javascript:window.close();
45、表格透明
style="FILTER: alpha(opacity=72)"
46、如何避免别人把你的网页放在框架中
<script language=“javascript”><!--if (self!=top){top.location=self.location;} -->< /script>
47、Alt和Title的区别
alt 用来给图片来提示的。Title用来给链接文字或普通文字提示的。
<a href="#" Title="给链接文字提示">文字</a>
<p Title="给链接文字提示">文字</p>
<img src="图片链接" alt="给图片提示">









