jquery元素相对定位插件js代码

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

以下是 jquery元素相对定位插件js代码 的示例演示效果:

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

部分效果截图:

jquery元素相对定位插件js代码

HTML代码(index.html):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>jqueryԪ����Զ�λ���</title>
<link rel="stylesheet" type="text/css" href="css/layout.css" />
<!--[if lte IE 8]>
	 <link rel="stylesheet" type="text/css" href="css/layout.ie.css"/>
<![endif]-->
		
		<script type="text/javascript" src="js/jquery-1.6-min.js"></script>
		<script type="text/javascript" src="js/jquery.place-min.js"></script>
		<script type="text/javascript" src="js/jquery.demo-min.js"></script>
	</head>

	<body>

    <div id="content">
	<br><br><br><br>
		<!-- LAYOUT -->
		<div id="layout">
		
			<h1>Element Place (jQuery)</h1>
		
			<!-- SECTION 1 -->
			<div class="wrapper odd">
				<h3>Demo</h3>
				
				<div class="threeCol">
					<div id="staticBox">#staticBox</div>
					<div id="positionedBox">#positionedBox</div>
					
					<h4>Presets:</h4>
					
					<ol id="presets">
						<li><a href="#dropdown">Dropdown</a></li>
						<li><a href="#tooltip">Tooltip</a></li>
						<li><a href="#infotip">Info tip</a></li>
						<li><a href="#cornerRibbon">Corner Ribbon</a></li>
						<li><a href="#blockOverlay">Block Overlay</a></li>
						<li><a href="#stickyNav">Sticky Nav</a></li>
						<li><a href="#infoBar">Info Bar</a></li>
						<li><a href="#modal">Modal</a></li>
						<li><a href="#sidebar">Sidebar</a></li>
						<li><a href="#dock">Dock</a></li>
					</ol>
				</div>
				
				<div class="fiveCol">
					<!-- GROUPED ELEMENTS -->
					<div class="stack">
						
						<h4>Options</h4>
					
						<ul>
							<li class="threeCol">
								<label for="position" title="The CSS position property that should be applied to the selected HTML element.">Position: </label>
								<select id="position" class="full">
									<option value="absolute" selected="selected">Absolute (default)</option>
									<option value="fixed">Fixed</option>
								</select>
							</li>
							<li class="twoCol lastChild">
								<label for="z" title="The CSS z-index value that should be applied to the selected HTML element.">Z-Index: </label>
								<input type="text" id="z" value="1000" class="number" />
							</li>
							<li class="threeCol">
								<label for="relativeTo" title="The HTML element, window or document object, relative to which the selected HTML element will be positioned.">Relative to: </label>
								<select id="relativeTo" class="full">
									<option value="window">Window/Viewport (default)</option>
									<option value="document">Document</option>
									<option value="#layout">#layout</option>
									<option value="div.wrapper">div.wrapper</option>
									<option value="#staticBox" selected="selected">#staticBox</option>
								</select>
							</li>
							<li class="twoCol lastChild">
								<br />
								<label for="includeMargin" style="display: inline;" title="If true, margins of the relative to element are added to the calculation.">Include Margin? </label>
								<input type="checkbox" id="includeMargin" value="true" />
							</li>
							<li class="threeCol">
								<label for="x" title="The horizontal alignment of the selected HTML element relative to the specified HTML element, window or document object.">X: </label>
								<select id="x" class="full">
									<option value="left">Left (default)</option>
									<option value="leftEdge" selected="selected">Left Edge</option>
									<option value="right">Right</option>
									<option value="rightEdge">Right Edge</option>
									<option value="center">Center</option>
									<option value="overlay">Overlay</option>
								</select>
							</li>
							<li class="twoCol lastChild">
								<label for="offsetX" title="The amount of spacing to add or take away from the set vertical position of the selected HTML element.">Offset: </label>
								<input type="text" id="offsetX" value="0" class="number" />
							</li>
							<li class="threeCol">
								<label for="y" title="The vertical alignment of the selected HTML element relative to the specified HTML element, window or document object.">Y: </label>
								<select id="y" class="full">
									<option value="top">Top (default)</option>
									<option value="topEdge">Top Edge</option>
									<option value="bottom">Bottom</option>
									<option value="bottomEdge" selected="selected">Bottom Edge</option>
									<option value="center">Center</option>
									<option value="overlay">Overlay</option>
								</select>
							</li>
							<li class="twoCol lastChild">
								<label for="offsetY" title="The amount of spacing to add or take away from the set vertical position of the selected HTML element.">Offset: </label>
								<input type="text" id="offsetY" value="0" class="number" />
							</li>
							
							<li class="threeCol">
								<label for="boundingBox" title="The HTML element, window or document object; boundaries of which are used to bound an element inside a region.">Bounding Box: </label>
								<select id="boundingBox" class="full">
									<option value="window" selected="selected">Window/Viewport (default)</option>
									<option value="document">Document</option>
									<option value="#layout">#layout</option>
									<option value="div.wrapper">div.wrapper</option>
								</select>
							</li>
							<li class="twoCol lastChild" style="margin-bottom: 0;">
								<label for="inBoundX" style="display: inline;" title="If true, the selected HTML element is kept inside the left/right edge of the bounding box.">inBoundX: </label>
								<input type="checkbox" id="inBoundX" value="true" checked="checked" />	
							</li>		
							<li class="twoCol lastChild" style="margin-bottom: 0;">
								<label for="inBoundY" style="display: inline; margin-bottom: 0" title="If true, the selected HTML element is kept inside the top/bottom edge of the bounding box.">inBoundY: </label>
								<input type="checkbox" id="inBoundY" value="true" checked="checked" />	
							</li>
						</ul>
					
					</div>
					<!-- END GROUPED ELEMENTS -->
				</div>
				
				<div class="stack eightCol">
					<h4>Code</h4>
						
					<textarea id="code" class="full"></textarea>
				</div>
				
			</div>
			<!-- END SECTION 1 -->
			
		</div>
		<!-- END LAYOUT -->
	
<!--DEMO end-->
	</div>
</body>
</html>

CSS代码(layout.ie.css):

html,body{height:100%;margin:0;padding:0;}
附件:下载该文件资源,减少时间成本(增值服务)
留言
该资源可下载
File Source
.rar
134.59 KB
jquery特效1
最新结算
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
打赏文章