JS技术

Javascript特效的制作_Javascript教程(2)

字号+ 作者:H5之家 来源:H5之家 2015-09-26 13:00 我要评论( )

d. 滑动弹出效果,6行 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN html xmlns= head meta http-equiv=Content-Type content=text/html; charset=gb2312 / titlePopup/title style * { font-size

d. 滑动弹出效果,6行
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Popup</title>
<style>
* { font-size:12px; font-family:Verdana,宋体; }
html { margin:0px; padding:0px; overflow:auto; }
body { margin:0px; padding:15px; background-color:buttonface; }
#w { position:absolute; width:1px; height:1px; overflow:hidden; border:2px groove #281; cursor:default; -moz-user-select:none; }
#t { line-height:20px; height:20px; width:480px; overflow:hidden; background-color:#27C; color:white; font-weight:bold; border-bottom:1px outset blue; text-align:center; }
#winBody { height:248px; width:480px; overflow-x:hidden; overflow-y:auto; border-top:1px inset blue; padding:10px; text-indent:10px; background-color:white; }
</style>
</head>
<body>
<div id="w">
 <div id="t">Demo Win - Popup</div>
 <div id="winBody">Hello world</div>
</div>
</body>
<script>
(function(o,t,i,j,s){
 i=j=1;s=o.style;
 t=setInterval(function(){
  o.offsetWidth<480?(s.width=(482-600/++i<<0)+"px"):(o.offsetHeight<270?s.height=(272-400/++j<<0)+"px":clearInterval(t));
 },15);
})(document.getElementById("w"));
</script>
</html>

 

1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。

相关文章
  • JavaScript特效的实现_Javascript教程

    JavaScript特效的实现_Javascript教程

    2015-09-26 08:00

网友点评