JQuery Study Notes— A small demo for Smooth Animated Menu

1. Before expanding:

2.  coding:

<!DOCTYPE html>
<html>
<head>
    <title>Smooth Animated Menu</title>
    <script src="http://jqueryjs.googlecode.com/files/jquery-1.3.js" type="text/javascript"></script>
    <script src="js/jquery.easing.1.3.js"></script>
    <style>
        body {
            background-color: #F3F3F3;
            font-family: "Lucida Grande", arial, sans-serif;
        }
        a{
            text-decoration:none;
            color:#fff;
        }
        ul {
            /*width: 500px; Don't add properties of width and height to 'ul'
            height: 50px;*/
        }
        li {
            width: 100px;
            height: 50px;
            text-align: center;
            /*padding-top: 10px;*/
            float: left;
            overflow: hidden;
        }
        p{
            padding:0px 5px;

        }
        .subText {
            color: #191919;
            padding-top: 15px;
        }
        .green {
            background: #649e37 url("images/green-item-bg.jpg") no-repeat right top;
        }
        .yellow {
            background: #fbc701 url("images/yellow-item-bg.jpg") no-repeat right top;
        }
        .red {
            background: #c61e01 url("images/red-item-bg.jpg") no-repeat right top;
        }
        .blue {
            background: #008cb7 url("images/blue-item-bg.jpg") no-repeat right top;
        }
        .purple {
            background: #5121b3 url("images/purple-item-bg.jpg") no-repeat right top;
        }
    </style>
    <script>
        $(document).ready(function () {
            $("a").click(function () {
                this.blur();
            });
            $("li").mouseover(function () {
                $(this).stop().animate({ height: '150px' }, { queue: false, duration: 600, easing: 'easeOutBounce' })
            });
            $("li").mouseout(function () {
                $(this).stop().animate({height:'50px'},{queue:false,duration:600,easing:'easeOutBounce'})
            })
        });
    </script>
</head>
<body>
    <p>Rollover a menu item to expand it.</p>
    <ul>
        <li class ="green">
            <p><a href="#">Home</a></p>
            <p class="subText">The front of page</p>
        </li>
        <li class="yellow">
            <p><a href="#">About</a></p>
            <p class="subText">More info</p>
        </li>
        <li class="red">
            <p><a href="#">Contact</a></p>
            <p class="subText">Get in touch</p>
        </li>
        <li class="blue">
            <p><a href="#">Submit</a></p>
            <p class="subText">Send us your stuff!</p>
        </li>
        <li class="purple">
            <p><a href="#">Terms</a></p>
            <p class="subText">Legal things</p>
        </li>
    </ul>
</body>
</html>
时间: 2024-08-07 02:36:50

JQuery Study Notes— A small demo for Smooth Animated Menu的相关文章

JQuery Study Notes— A small demo for unfolding its content

1. Before unfolding: 2. After unfolding: 3. coding: <!DOCTYPE html> <html lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Home</title> <style> .parent { width: 500px; color: white; } .l

Machine Learning Algorithms Study Notes(2)--Supervised Learning

Machine Learning Algorithms Study Notes 高雪松 @雪松Cedro Microsoft MVP 2    Supervised Learning    3 2.1    Perceptron Learning Algorithm (PLA)    3 2.1.1    PLA -- "知错能改"演算法    4 2.2    Linear Regression    6 2.2.1    线性回归模型    6 2.2.2    最小二乘法( le

My study notes —— 初始24种设计模式

摘要 设计模式(Design pattern)是一套被反复使用.多数人知晓的.经过分类编目的.代码设计经验的总结.使用设计模式是为了可重用代码.让代码更容易被他人理解.保证代码可靠性. 毫无疑问,设计模式于己于他人于系统都是多赢的:设计模式使代码编制真正工程化:设计模式是软件工程的基石脉络,如同大厦的结构一样. 目录 设计概念 设计原则 四要素 基本模式 创建型 结构型 行为型 正文 设计概念 Change:让代码富有弹性,能够应对需求的变化: DRY:消除冗余,让代码更精炼: KISS:让代码

[2016-03-16]How can I take better study notes?

A:Dad,how can I take better study notes? B:Okay,look.Divide your pate into two columns. A:Like this? B:No.the one on the right should be larger. A:Let me do it agian.Is this better? B:Yes.Write down all the ideas on the right side of the page. A:What

Machine Learning Algorithms Study Notes(3)--Learning Theory

Machine Learning Algorithms Study Notes 高雪松 @雪松Cedro Microsoft MVP 本系列文章是Andrew Ng 在斯坦福的机器学习课程 CS 229 的学习笔记. Machine Learning Algorithms Study Notes 系列文章介绍 3 Learning Theory 3.1 Regularization and model selection 模型选择问题:对于一个学习问题,可以有多种模型选择.比如要拟合一组样本点,

bootstrap+jquery+mustache+springmvc+idworker整合demo代码

原文:bootstrap+jquery+mustache+springmvc+idworker整合demo代码 源代码下载地址:http://www.zuidaima.com/share/1550463719148544.htm 简单实现的一个发表评论的代码,麻雀虽小五脏俱全,请有需要的牛人下载,另外最代码决定用mustache来做js的模板. maven的工程,需要转换成dynamic web project,不会的请参考这个:如何在eclipse jee中创建Maven project并且转

Machine Learning Algorithms Study Notes(1)--Introduction

Machine Learning Algorithms Study Notes 高雪松 @雪松Cedro Microsoft MVP 目 录 1    Introduction    1 1.1    What is Machine Learning    1 1.2    学习心得和笔记的框架    1 2    Supervised Learning    3 2.1    Perceptron Learning Algorithm (PLA)    3 2.1.1    PLA -- "知

jQuery之基础核心(demo)

jQuery之基础核心 作者的热门手记 jQuery之基础核心(demo) 本文主要简单的介绍下jQuery一些基础核心,大致了解jQuery使用模式.适用于有HTML.CSS.javascript基础,又刚刚接触jQuery的初学者.(如有错误,请指正)咱们从基础语法说起,基础语法是:$(selector).action() 美元符号$定义jQuery 选择符(selector)"查询"和"查找" HTML 元素 jQuery 的 action() 执行对元素的操

jquery几个常用的demo

新建两个页面.一个叫做  ---- demo1.js------- 一个叫做 ----- demo1.html----- 代码分别如下 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title></title> 6 <!--引入框架--> 7 <link href="