Ruler标尺网页框架代码

版权:原创 更新时间:1年以上
[该文章底部包含文件资源,可根据自己情况,决定是否下载资源使用,时间>金钱,如有需要,立即查看资源]

以下是 Ruler标尺网页框架代码 的示例演示效果:

当前平台(PC电脑)
  • 平台:

部分效果截图:

Ruler标尺网页框架代码

HTML代码(index.html):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="keywords" content="JS代码,其他代码,JS广告代码,JS特效代码" />
<meta name="description" content="此代码内容为Ruler标尺网页框架代码,属于站长常用代码" />
<title>Ruler标尺网页框架代码</title>
<link href="css/ruler.css" rel="stylesheet" type="text/css" />
<script src="js/jquery.min.js"></script>
<script src="js/audiojs/audio.min.js"></script>
<script src="js/clock.js" type=text/javascript></script>
<script language="javascript" type="text/javascript">
function getWindowHeight() {
	var windowHeight = 0;
	if (typeof(window.innerHeight) == 'number') {
		windowHeight = window.innerHeight;
	}
	else {
		if (document.documentElement && document.documentElement.clientHeight) {
			windowHeight = document.documentElement.clientHeight;
		}
		else {
			if (document.body && document.body.clientHeight) {
				windowHeight = document.body.clientHeight;
			}
		}
	}
	return windowHeight;
};
function getWindowWidth() {
	var windowWidth = 0;
	if (typeof(window.innerWidth) == 'number') {
		windowWidth = window.innerWidth;
	}
	else {
		if (document.documentElement && document.documentElement.clientWidth) {
			windowWidth = document.documentElement.clientWidth;
		}
		else {
			if (document.body && document.body.clientWidth) {
				windowWidth = document.body.clientWidth;
			}
		}
	}
	return windowWidth;
};
$(document).ready(function(){
	$("#myiframe").height(getWindowHeight());
	$("#myiframe").width(getWindowWidth());
});

$(window).bind("resize",function() {
	$("#myiframe").height(getWindowHeight());
	$("#myiframe").width(getWindowWidth());
});
$(function() {
  var audios = document.getElementsByTagName('audio');
  var PageMusic = audiojs.create(audios[0]);
  var 音乐开关 = true;
  PageMusic.load("music/bgm.mp3");

  function MusicPause(){
	  PageMusic.playPause();
  }
  $("#MusicStop").css({"display":"none"});
  $("#MusicICO").click(function(){
	  if(音乐开关){
		  $("#MusicPlay").css({"display":"none"});
		  $("#MusicStop").css({"display":"block"});
		  音乐开关 = false;
	  }else{
		  $("#MusicPlay").css({"display":"block"});
		  $("#MusicStop").css({"display":"none"});
		  音乐开关 = true;
	  }
	  MusicPause();
  });
});
</script>
</head>
<body scroll=no>
<!-- 代码 开始 -->
<div class="gang" style="margin-left:0px;margin-top:0px;overflow:hidden;position:relative;*margin-top:0px;*top:0px;">
    <div class="grid" onselectstart='return false;' style="background-color:#FFFFFF; position: absolute; left:18px; top:18px; width:100%;height:100%;">
        <!-- 网页主体内容 开始 -->
        <!-- 网页主体内容 结束 -->
    </div>
    <div class="hRule" style="width: 1920px;"></div>
    <div class="vRule" style="height: 1200px;"></div>       
    <div class="vline1" style="height:1200px;"></div>
    <div class="vline2" style="height:1200px;"></div>
</div>

<!-- 背景音乐 -->
<div id="BGmusic">
    <div id="Music"><audio autoplay loop></audio></div>
    <div id="MusicICO">
        <div id="MusicPlay"><img src="images/play.png" width="16" height="16"></div>
        <div id="MusicStop"><img src="images/stop.png" width="16" height="16"></div>
    </div>  
</div>

<!-- 时间 -->
<div><span id="clock"></span></div>

<script type="text/javascript">
	var clock = new Clock();
	clock.display(document.getElementById("clock"));
</script>
<!-- 代码 结束 -->
</body>
</html>

JS代码(clock.js):

function Clock(){
	var date = new Date();
	this.year = date.getFullYear();
	this.month = date.getMonth() + 1;
	this.date = date.getDate();
	this.day = new Array("星期日","星期一","星期二","星期三","星期四","星期五","星期六")[date.getDay()];
	this.hour = date.getHours() < 10 ? "0" + date.getHours():date.getHours();
	this.minute = date.getMinutes() < 10 ? "0" + date.getMinutes():date.getMinutes();
	this.second = date.getSeconds() < 10 ? "0" + date.getSeconds():date.getSeconds();
	this.toString = function(){
	return "" + this.year + "年" + this.month + "月" + this.date + "日 " + this.hour + ":" + this.minute + ":" + this.second + " " + this.day;
}
;
	this.toSimpleDate = function(){
	return this.year + "-" + this.month + "-" + this.date;
}
;
	this.toDetailDate = function(){
	return this.year + "-" + this.month + "-" + this.date + " " + this.hour + ":" + this.minute + ":" + this.second;
}
;
	this.display = function(ele){
	var clock = new Clock();
	ele.innerHTML = clock.toString();
	window.setTimeout(function(){
	clock.display(ele);
}
,1000);
}
;
}

CSS代码(ruler.css):

html,body{width:100%;margin:0 auto;font-size:12px;overflow:hidden;}
#BGmusic{position:absolute;right:30px;top:30px;}
#Music{position:absolute;overflow:hidden;height:0px;width:0px;}
#MusicICO,#MusicPlay,#MusicStop{position:absolute;cursor:pointer;}
#clock{font-family:"Microsoft Yahei",Tahoma,Helvetica,Arial,sans-serif;color:#333333;position:absolute;right:0px;Bottom:0px;}
#copyright{font-family:"Verdana",Tahoma,Helvetica,Arial,sans-serif;color:#333333;position:absolute;left:20px;Bottom:0px;}
a{color:#999999;text-decoration:none;}
a:hover{color:#333333;text-decoration:none;}
.ruler{background:rgba(255,255,255,1);color:#444;line-height:14px;overflow:hidden;}
.ruler > div{background:#444;}
.hRule{position:absolute;width:100%;height:18px;left:18px;top:0px;background:url(../images/hRule.gif) left top no-repeat;}
.vRule{position:absolute;min-height:100%;width:18px;left:0px;top:18px;background:url(../images/vRule.gif) left top no-repeat;}
.grid{position:absolute;top:0px;left:0px;background:url(../images/bg.png);}
附件:下载该文件资源,减少时间成本(增值服务)
留言
该资源可下载
File Source
.rar
1.88 MB
Html JS 其它特效2
最新结算
jquery虚拟键盘中文打字效果js代码
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
jquery虚拟键盘中文打字效果js代码
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
HTML5实现CSS滤镜图片切换特效代码
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
jQuery头像裁剪插件cropbox js代码
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
jQuery头像裁剪插件cropbox js代码
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
CSS3制作3D图片立方体旋转特效
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
CSS3制作3D图片立方体旋转特效
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
CSS3制作3D图片立方体旋转特效
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
CSS3制作3D图片立方体旋转特效
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
jQuery+css3实现信封效果
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
我们力求给您提供有用的文章,再此基础上,会附加营收资源,不做任何广告,让平台可以更好发展 若您发现您的权利被侵害,或使用了您的版权,请发邮件联系 sunlifel@foxmail.com ggbig觉得 : 不提供源码的文章不是好文章
合作伙伴
联系我们
  • QQ:21499807
  • 邮箱:sunlifel@foxmail.com
  • QQ扫一扫加QQ
    QQ扫一扫
Copyright 2023-2024 ggbig.com·皖ICP备2023004211号-1
打赏文章