刷新页面背景自动变换代码 2011-11-23 前端开发博客 0 2,102 网页设计 <script language=javascript > (function(){var d = {0:['10-00-31'],1:['10-19-39'],2:['10-12-15'],3:['09-08-45'],4:['10-10-49'],5:['10-07-44'],6:['10-01-39'],7:['09-59-15']},c = d[+new Date %8];document.write('<style>body{background: url(http://hexun.com/homephoto3/20110601/6810545/bk'+c[0]+'.jpg) no-repeat center center fixed !important;filter:alpha(opacity=75);opacity:0.75;}</style>');})() </script> 运行代码没效果请刷新本页面重试,但是在正常使用情况下不会出现这种现象 相关文章: 移除wordpress头部自带的.recentcomments样式 csshack:兼容ie系列和firefox的简单方法 CSS缩写语法,让你的网站代码更简练易读 让IE浏览器支持HTML5标准的方法