- 浏览: 77408 次
- 性别:
- 来自: 济南
-
最新评论
-
疯狂的草儿:
刚开始读这篇文章 我以为lz 招了个美女呢 呵呵
踏实与成功 -
binoruv:
bucuo
学习jQuery笔记(三)包装集 -
jy00314996:
若是人间 写道刚开始学接触PV3D,跟你学习学习,呵呵,交个朋 ...
Papervision3D(PV3D)笔记&教程(1)-四个基础元素 -
若是人间:
刚开始学接触PV3D,跟你学习学习,呵呵,交个朋友哈
Papervision3D(PV3D)笔记&教程(1)-四个基础元素 -
jy00314996:
martri 写道呵呵,不错,谢谢!
谢谢~~~一起进步!
Freemarker网站静态化的实现
1.引言:
如今,许多网站使用的是标签的内容,以节省空间的一个网页。 我看到了很多网站使用WordPress的标签界面,其类别,职位,意见和随机员额内容。 这是一个很好的“空间节约” ,如果使用正确,它可以提升您的网站可用性以及。 权利,首先,我们需要有创意和设计结构为标签界面
自己的想法:
按钮顶端,内容居住在不同的DIV元素,
点击其中一个按钮,它表明的有关内容;
按其他按钮,它掩盖了现有的和显示正确的。
结构的设计:
2 、HTML
<div class="box"> <ul id="tabMenu"> <li class="posts selected"></li> <!-- default button--> <li class="comments"></li> <li class="category"></li> <li class="famous"></li> <li class="random"></li> </ul> <div class="boxTop"></div> <div class="boxBody"> <!-- default page--> <div id="posts" class="show"> <ul> <li>Post 1</li> <li>Post 2</li> <li class="last">Post 3</li> </ul> </div> <div id="comments"> <ul> <li>Comment 1</li> <li>Comment 2</li> <li class="last">Comment 3</li> </ul> </div> <div id="category"> <ul> <li>Category 1</li> <li>Category 2</li> <li class="last">Category 3</li> </ul> </div> <div id="famous"> <ul> <li>Famous post 1</li> <li>Famous post 2</li> <li class="last">Famous post 3</li> </ul> </div> <div id="random"> <ul> <li>Random post 1</li> <li>Random post 2</li> <li class="last">Random post 3</li> </ul> </div> </div> <div class="boxBottom"></div> </div>
3、CSS
<style> a { color:#ccc; text-decoration:none; } a:hover { color:#ccc; text-decoration:none } #tabMenu { margin:0; padding:0 0 0 15px; list-style:none; } #tabMenu li { float:left; height:32px; width:39px; cursor:pointer; cursor:hand } /* this is the button images */ li.comments {background:url(images/tabComment.gif) no-repeat 0 -32px;} li.posts {background:url(images/tabStar.gif) no-repeat 0 -32px;} li.category {background:url(images/tabFolder.gif) no-repeat 0 -32px;} li.famous {background:url(images/tabHeart.gif) no-repeat 0 -32px;} li.random {background:url(images/tabRandom.gif) no-repeat 0 -32px;} li.mouseover {background-position:0 0;} li.mouseout {background-position:0 -32px;} li.selected {background-position:0 0;} .box { width:227px } .boxTop { background:url(images/boxTop.gif)no-repeat; height:11px; clear:both } .boxBody { background-color:#282828; } .boxBottom { background:url(images/boxBottom.gif) no-repeat; height:11px; } .boxBody div { display:none; } .boxBody div.show { display:block; } .boxBody #category a { display:block } /* styling for the content*/ .boxBody div ul { margin:0 10px 0 25px; padding:0; width:190px; list-style-image:url(images/arrow.gif) } .boxBody div li { border-bottom:1px dotted #8e8e8e; padding:4px 0; cursor:hand; cursor:pointer } .boxBody div ul li.last { border-bottom:none } .boxBody div li span { font-size:8px; font-style:italic; color:#888; } /* IE Hacks */ *html .boxTop {margin-bottom:-2px;} *html .boxBody div ul {margin-left:10px;padding-left:15px;} </style>
4、Javascript
<SCRIPT type="text/javascript"> $(document).ready(function() { //Get all the LI from the #tabMenu UL $('#tabMenu > li').click(function(){ //perform the actions when it's not selected if (!$(this).hasClass('selected')) { //remove the selected class from all LI $('#tabMenu > li').removeClass('selected'); //After cleared all the LI, reassign the class to the selected tab $(this).addClass('selected'); //Hide all the DIV in .boxBody $('.boxBody div').slideUp('1500'); //Look for the right DIV index based on the Navigation UL index $('.boxBody div:eq(' + $('#tabMenu > li').index(this) + ')').slideDown('1500'); } }).mouseover(function() { //Add and remove class, Personally I dont think this is the right way to do it, //if you have better ideas to toggle it, please comment $(this).addClass('mouseover'); $(this).removeClass('mouseout'); }).mouseout(function() { //Add and remove class $(this).addClass('mouseout'); $(this).removeClass('mouseover'); }); //Mouseover with animate Effect for Category menu list :) $('.boxBody #category li').mouseover(function() { //Change background color and animate the padding $(this).css('backgroundColor','#888'); $(this).children().animate({paddingLeft:"20px"}, {queue:false, duration:300}); }).mouseout(function() { //Change background color and animate the padding $(this).css('backgroundColor',''); $(this).children().animate({paddingLeft:"0"}, {queue:false, duration:300}); }); //Mouseover effect for Posts, Comments, Famous Posts and Random Posts menu list. $('.boxBody li').click(function(){ window.location = $(this).find("a").attr("href"); }).mouseover(function() { $(this).css('backgroundColor','#888'); }).mouseout(function() { $(this).css('backgroundColor',''); }); }); </SCRIPT>
5、完成
发表评论
-
使用JQuery+Struts1.3实现JSON的post传递
2009-02-20 15:28 843json格式的数据传递已经红遍全球,JQuery的 ... -
学习jQuery笔记(十)jQuery表单验证与自动完成提示插件
2009-07-01 09:20 3632一.摘要 本文是介绍两个最常用的jQuery插件. 分别用于 ... -
学习jQuery笔记(九)jQueryUI常用功能实战
2009-06-26 15:11 1570一.摘要 本文是实战篇. 使用jQueryUI完成制作网站的 ... -
学习jQuery笔记(八)jQuery工具函数
2009-06-26 10:10 1007一.摘要 我们经常要使用脚本处理各种业务逻辑, 最常见的就是 ... -
学习jQuery笔记(七)jQuery动画-让页面动起来!
2009-06-25 14:46 1770一.摘要 本系列文章将 ... -
学习jQuery笔记(六)jQuery中的Ajax
2009-06-25 14:36 1554一.摘要 本篇文章讲解如何使用jQuery方便快捷的实现Aj ... -
学习jQuery笔记(五)事件与事件对象
2009-06-24 15:01 1171一.摘要 事件是脚本编程的灵魂. 所以本章内容也是jQuer ... -
学习jQuery笔记(四)操作元素的属性与样式
2009-06-24 14:28 1573一.摘要 本篇文章讲解 ... -
学习jQuery笔记(三)包装集
2009-06-23 17:34 1093一.摘要 在使用jQuery选择器获取到jQuery包装集后 ... -
学习jQuery笔记(二)选择器
2009-06-23 15:22 1182一.摘要 本章讲解jQuery最重要的选择器部分的知识. 有 ... -
学习jQuery笔记(一)入门篇
2009-06-23 14:44 1258首先什么是jQuery? ... -
学习jQuery笔记 前篇 开发环境配置
2009-06-23 14:34 970一.摘要 本系列文章将带您进入jQuery的精彩世界 ... -
jQuery日常使用技巧总结
2009-06-19 14:40 8441、关于页面元素的引用 ... -
jQuery使用JSON的例子
2009-06-12 15:53 11731、在HTML中,有这样一个表单: <form met ... -
用JQuery解析Json
2009-06-12 15:36 2007JSON的数据格式现在挺热门的!这里不解释了。主要讲下Jque ... -
jQuery的动态效果效果演示
2009-06-12 15:24 1245Jquery做动态效果,可以使用animate函数, ... -
jquery 插件corner实现圆角边框
2009-06-12 15:11 1407<!DOCTYPE html PUBLIC &qu ... -
各种效果的jquery ui(接口)介绍
2009-06-11 10:21 1592基本的鼠标互动: 拖拽(drag and dropping) ... -
在jQuery中利用AJAX加载XML数据并解析
2009-06-11 10:03 8341,Content-Type很多时候无法解析就是Con ... -
jQuery & CSS制作折页效果
2009-06-09 13:21 2032不多说先看效果图 demo地址:http://www.s ...
相关推荐
"jQuery Tabbed Interface / Tabbed Structure Menu Tutorial"提供了创建分页式界面的步骤,"Mega Vertical"和"Memu"则是专为垂直布局设计的大型导航菜单,适合内容丰富的网站。"Sweet AJAX Tabs With jQuery 1.4 & ...
在网页设计中,标签页(Tabbed Interface)是一种常见的用户界面元素,它允许用户在不同的内容区域之间切换,而无需加载新的页面。JQuery是一个强大的JavaScript库,它为实现这样的动态效果提供了简单易用的API。...
其次,TAB标签(Tabbed Interface)是用户界面设计中的一个元素,用于组织和切换多个视图或内容区域。在网页上,通常通过点击不同的标签按钮来显示或隐藏对应的面板内容。这为用户提供了简洁的导航方式,使他们能...
其次,Tab切换(Tabbed Interface)是网页设计中的一种组织内容的方式,它允许用户在不同的面板间切换,显示不同的信息。Tab切换通常用CSS实现静态样式,JavaScript处理动态切换。例如,可以使用jQuery UI库中的tabs...
2. **页签(Tabbed Interface)**:页签是一种有效的页面布局方式,用于组织大量内容而不使页面显得混乱。实现页签功能通常需要用到JavaScript库,如jQuery UI或Bootstrap。这些库提供了预设的样式和交互逻辑,包括...
在提供的文件列表中,"A-Simple-JavaScript-Tabbed-Interface.pdf"可能是详细的设计文档或教程,讲解了实现这个选项卡式界面的具体步骤和技术细节。而"LogOn.aspx?rp=%2FKB%2Fscripting%2F1091954%2Ftabtest.zip&...