jQuery全屏内容插件代码

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

以下是 jQuery全屏内容插件代码 的示例演示效果:

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

部分效果截图:

jQuery全屏内容插件代码

HTML代码(index.html):

<!doctype html>
<!--[if lt IE 7]> <html class="no-js ie9 ie8 ie7" lang="pt-br"> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie9 ie8" lang="pt-br"> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie9" lang="pt-br"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="pt-br"> <!--<![endif]-->
<head>

	<!-- CONFIGS -->
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<title>jQuery全屏内容插件</title>
	<meta name="description" content="">
	<meta name="viewport" content="width=device-width">
	<link rel="stylesheet" type="text/css" media="all" href="css/reset.css" />
	<link rel="stylesheet" type="text/css" media="all" href="css/style.css" />

</head>

<body>

	<div id="container">

		<!-- Home -->
		<div id="home" class="home">

			<div class="wrap">

				<h1>Jquery Full Content</h1>
				<h2>Enables fully websites</h2>

				<ul class="options">
					<li>
						<a href="#download">
							<big>Download</big>
							Ready for use
						</a>
					</li>

					<li>
						<a href="#what">
							<big>What</big>
							the plugin does
						</a>
					</li>

					<li>
						<a href="#documentation">
							<big>Docs</big>
							How use this plugin
						</a>
					</li>

				</ul>

			</div>

		</div>
		<!-- /Home -->

		<!-- Download -->
		<div id="download" class="download">

			<div class="wrap">

				<h2>What pack you want to download</h2>
				<h3>Develop by <a href="" title="Zeh Fernandes" target="_blank">
				Zeh Fernandes</a>. Special thanks to Zeno Rocha and Cezar Luiz.</h3>
				<ul class="options big">
					<li>
						<a href="#">
							<big>Minify</big>
							Just the core
						</a>
					</li>

					<li>
						<a href="#">
							<big>Complete</big>
							Demo + core
						</a>
					</li>

				</ul>

			</div>


		</div>
		<!-- /Download -->

		<!-- Documentation -->
		<div id="documentation" class="documentation scrollv">

			<div class="wrap">	

				<h2>Markup</h2>
				<code>
				&lt;div id=&quot;container&quot;&gt;<br/><br/>

			    &nbsp; &lt;div id=&quot;stage1&quot;&gt;<br/>
			    &nbsp;&nbsp;//The content of this page<br/>
			    &nbsp; &lt;/div&gt;<br/><br/>

			    &nbsp; &lt;div id=&quot;stage2&quot;&gt;<br/>
			    &nbsp;&nbsp;//The content of this page<br/>
			    &nbsp; &lt;/div&gt;<br/><br/>

				&lt;/div&gt;
				</code>

				<p>The id of stage is how you link</p>
				<code>&lt;a href=&quot;#stage2&quot;&gt;Go to stage2&lt;/a&gt;</code>

				<h2>Style</h2>

				<p>Don&#39;t show scroll bars</p>

				<code>body { overflow-x: hidden; overflow-y: hidden; }</code>

				<p>In case you need vertical scroll</p>

				<code>stage1 { overflow-y: auto; }</code>

				<h2>Javascript</h2>

				<p>Put Jquery, ScrollTo Plugin and Jquery.fullContent</p>

				<code>
				&lt;script src=&quot;js/jquery-1.x.x.min.js&quot; 
				type=&quot;text/javascript&quot;&gt;&lt;/script&gt; <br/>
				&lt;script src=&quot;js/jquery.jquery.scrollTo.js&quot; 
				type=&quot;text/javascript&quot;&gt;&lt;/script&gt; <br/>
				&lt;script src=&quot;js/jquery.jquery.fullContent.js&quot; 
				type=&quot;text/javascript&quot;&gt;&lt;/script&gt; <br/>
				</code>

				<p>And you can configure this parameters:</p>

				<code>
				$(&#39;#container&#39;).fullContent({ <br/>
				&nbsp; stages: &#39;div&#39;, <br/>
				&nbsp; mapPosition: [{v: 1, h: 1}, {v: 1, h: 2}, {v: 2, h: 1}, 
				{v: 2, h: 2}], <br/>
				&nbsp; stageStart: 1, <br/>
				&nbsp; speedTransition: 800, <br/>
				&nbsp; idComplement: &#39;page_&#39; <br/>
				});
				</code>

				<h2>The Map Position</h2>

				<p>This parameter you can configuring the position which want 
				your stage. V - vertical position H - horizontal position. For 
				example</p>

				<code>
					v1h1 | v1h2 <br/>
					v2h1 | v2h2
				</code>

				<ul class="options small">
						<li><a href="#home">
							<big>Back</big>
							to home
						</a>
						</li>
				</ul>

			</div>

		</div>
		<!-- /Documentation -->

		<!-- What -->
		<div id="what" class="what scrollv">

			<div class="wrap">

					<h2>What the plugin does</h2>
					<ul class="list">
						<li>Create fully containers with width and height of 
						window</li>
						<li>Dynamic position: Each container could have vertical 
						and horizontal position set</li>
						<li>History hash in URL</li>
						<li>Scroll animation between containers</li>
						<li>Simple configuration and easy use</li>
					</ul>

					<ul class="options small">
						<li><a href="#home">
							<big>Back</big>
							to home
						</a>
						</li>
					</ul>

			</div>

		</div>
		<!-- /What -->

	</div>

	<!-- jQuery -->
	<script src="js/jquery.min.js"></script>
	<script>window.jQuery || document.write('<script src="js/libs/jquery-1.8.1.min.js"><\/script>')</script>
	<script src="js/scrollTo.min.js"></script>
	<script src="js/jquery.fullContent.min.js"></script>
	<script type="text/javascript">
		$('#container').fullContent({
		    stages: 'div',
		    mapPosition: [{v: 1, h: 3}, {v: 1, h: 1}, {v: 1, h: 6}, {v: 3, h: 3}],
		    stageStart: 1,
		    idComplement: 'page_'
		});
	</script>
	</body>
</html>







JS代码(jquery.fullContent.min.js):

/* * Project:Jquery FullContent * Description:Plugin which allows a full content browser navigation. Flexible and Extended. * Author:Zeh Fernandes | zehfernandes.com * This plugin needs jquery.ScrollTo http://demos.flesler.com/jquery/scrollTo/ to work. */
(function(a,b,c){
	function g(c,e){
	this.element=c,this.$window=a(b),this.options=a.extend({
}
,f,e),this._defaults=f,this._name=d,this.init(),this.configStage()}
var d="fullContent",e=b.document,f={
	stages:"div",idComplement:"page_",stageStart:1,speedTransition:800,mapPosition:""}
;
	g.prototype.configStage=function(){
	var c=this.$window.width(),d=this.$window.height(),e=this.options.stages,f=this.options.mapPosition,g=0;
	a(this.element).children(e).each(function(b){
	a(this).css({
	position:"absolute",width:c,height:d}
);
	if(f[b]){
	var e=f[b];
	a(this).css({
	top:d*(e.v-1),left:c*(e.h-1)}
)}
else a(this).css({
	top:d*g}
);
	g++}
);
	if(b.location.hash){
	var h=b.location.hash.replace(/^#\/?/,"");
	a.scrollTo("#"+this.options.idComplement+h,0)}
}
,g.prototype.init=function(){
	var c=this,d=this.options.stages,e=this.options.idComplement;
	a(this.element).children(d).each(function(d){
	var f=a(this).attr("id");
	a(this).attr("id",e+f),!b.location.hash&&c.options.stageStart==d+1&&(a.scrollTo(a(this),0),b.location.hash=a(this).attr("id").replace(e,""))}
),this.bind()}
,g.prototype.bind=function(){
	var c=this,d=this.options.speedTransition,e=this.options.idComplement;
	this.$window.resize(function(){
	c.configStage()}
),this.$window.bind("hashchange",function(e){
	var f=b.location.hash.replace(/^#\/?/,"");
	a.scrollTo("#"+c.options.idComplement+f,d)}
)}
,a.fn[d]=function(b){
	return this.each(function(){
	a.data(this,"plugin_"+d)||a.data(this,"plugin_"+d,new g(this,b))}
)}
}
)(jQuery,window)

CSS代码(reset.css):

/*File:Reset v1.6.1Authors:Richard Clark - http://richclarkdesign.comDate:2010-09-17*/
html,body,div,span,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,abbr,address,cite,code,del,dfn,em,img,ins,kbd,q,samp,small,strong,sub,sup,var,b,i,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent;}
body{line-height:1;}
article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section,div{display:block;position:relative;}
nav ul{list-style:none;}
blockquote,q{quotes:none;}
blockquote:before,blockquote:after,q:before,q:after{content:'';content:none;}
a{margin:0;padding:0;font-size:100%;vertical-align:baseline;background:transparent;}
ins{background-color:#ff9;color:#000;text-decoration:none;}
mark{background-color:#ff9;color:#000;font-style:italic;font-weight:bold;}
del{text-decoration:line-through;}
abbr[title],dfn[title]{border-bottom:1px dotted;cursor:help;}
table{border-collapse:collapse;border-spacing:0;}
hr{display:block;height:1px;border:0;border-top:1px solid #cccccc;margin:1em 0;padding:0;}
input,select{vertical-align:middle;}

CSS代码(style.css):

/*Name:Jquery Full ContentAuthors:Zeh FernandesDate:2012-05-04*/
/* TYPOGRAPHY */
/* ----------------------------------------- */
@font-face{font-family:'FuturaLT-Condensed';src:url('../fontes/futuralt-condensed.eot');src:url('../fontes/futuralt-condensed.eot?#iefix') format('embedded-opentype'),url('../fontes/futuralt-condensed.woff') format('woff'),url('../fontes/futuralt-condensed.ttf') format('truetype'),url('../fontes/futuralt-condensed.svg#futuralt-condensed') format('svg');font-weight:normal;font-style:normal;}
@font-face{font-family:'GillSansLight';src:url('../fontes/gillsanslight.eot');src:url('../fontes/gillsanslight.eot?#iefix') format('embedded-opentype'),url('../fontes/gillsanslight.woff') format('woff'),url('../fontes/gillsanslight.ttf') format('truetype'),url('../fontes/gillsanslight.svg#gillsanslight') format('svg');font-weight:normal;font-style:normal;}
/* ALL */
/* ----------------------------------------- */
body{background:url(../images/bg.jpg);overflow-x:hidden;overflow-y:hidden;color:#fff;font-family:'GillSansLight',HeveticaNeue-Light,sans-serif;}
.scrollv{overflow-y:auto !important;}
.wrap{width:80%;margin:0 auto;}
h1,h2{font-weight:normal;text-transform:uppercase;text-align:center;}
h1{font-family:'FuturaLT-Condensed';font-size:111px;letter-spacing:-5px;padding-top:30px;}
h2{font-family:'GillSansLight';font-size:50px;letter-spacing:-2px;}
h3{font-family:'GillSansLight';font-size:22px;font-weight:normal;text-align:center;padding-top:5px;}
h3 a,h2 a{color:#775995;text-decoration:none;}
h3 a:hover,h2 a:hover{text-decoration:underline;}
.options{list-style:none;margin-top:8%;overflow:hidden;}
.options li{float:left;width:33%;height:350px;}
.options li:last-child{margin-right:0;}
.options a{display:block;width:250px;height:165px;border-radius:50%;border:2px solid #fff;color:#fff;text-decoration:none;font-size:25px;text-align:center;padding-top:85px;font-family:'GillSansLight';margin:0 auto;}
.options a big{display:block;font-size:50px;}
.options a:hover{background:rgba(217,45,237,0.15);}
code{color:white;text-shadow:1px 1px 1px rgba(0,0,0,0.2);padding:20px;background:rgba(255,255,255,0.3);clear:both;position:relative;display:block;margin:10px 0;border-radius:10px;}
p{font-size:16px;color:#fff;padding-top:15px;}
/* SPECIFICS */
/* ----------------------------------------- */
.big li{width:50%;height:auto;}
.big li a{width:300px;height:190px;padding-top:110px;margin:0 5%;}
.big li:first-child a{float:right;}
.small li{width:100%;height:auto;}
.small li a{width:180px;height:115px;padding-top:65px;font-size:20px;}
.small a big{font-size:35px}
.documentation h2{padding:40px 0 20px 0;}
.download h2:first-child,.documentation h2:first-child,.what h2:first-child{padding-top:8%;}
.list{font-size:25px;list-style:disc;margin:3% 10%}
.list li{margin:10px 0;}
.documentation .wrap{overflow:hidden;padding-bottom:50px;}
/* MEDIA QUERIES */
/* ----------------------------------------- */
@media screen and (max-width:1000px){h1{font-size:90px}
h2{font-size:40px;letter-spacing:normal;}
.home,.download{overflow-y:scroll;}
.options li{float:none;display:inline-block;width:100%;height:auto;margin-bottom:3%;}
.big li a{float:none !important;margin:0 auto;}
附件:下载该文件资源,减少时间成本(增值服务)
留言
该资源可下载
File Source
.rar
189.96 KB
Html 动画效果1
最新结算
股权转让协议意向书模板
类型: .docx 金额: CNY 2.23¥ 状态: 待结算 详细>
股权转让协议意向书模板
类型: .docx 金额: CNY 0.28¥ 状态: 待结算 详细>
CSS3图片向上3D翻转渐隐消失特效
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
CSS3图片向上3D翻转渐隐消失特效
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
.net c# 将金额转人名币大写金额
类型: .rar 金额: CNY 2.39¥ 状态: 待结算 详细>
.net c# 将金额转人名币大写金额
类型: .rar 金额: CNY 0.3¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 2.23¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 0.28¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 2.23¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 0.28¥ 状态: 待结算 详细>
我们力求给您提供有用的文章,再此基础上,会附加营收资源,不做任何广告,让平台可以更好发展 若您发现您的权利被侵害,或使用了您的版权,请发邮件联系 sunlifel@foxmail.com ggbig觉得 : 不提供源码的文章不是好文章
合作伙伴
联系我们
  • QQ:21499807
  • 邮箱:sunlifel@foxmail.com
  • QQ扫一扫加QQ
    QQ扫一扫
Copyright 2023-2024 ggbig.com·皖ICP备2023004211号-1
打赏文章