2017-6-4 jQuery 實戰 彈窗製作

來源:互聯網
上載者:User

標籤:btn   http   box   logs   bsp   pointer   function   ima   order   

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>    <script src="js/jquery-1.7.1.min.js"></script>    <title></title>    <style type="text/css">        #tc         {position:fixed;            width:400px;                                  left:50%;            margin-left:-200px;            top:-500px;            border:1px solid navy;            box-shadow:0 0 10px #808080;            border-radius:10px 11px;                      z-index:11;        }        #tc-top         {            width:100%;            height:30px;            background-color:navy;            color:white;            font-size:18px;            font-weight:bold;            text-align:center;            line-height:30px;             border-radius:10px 11px;        }        #tc-bottom         {            position:relative;            width:100%;            height:40px;                   }        #tc-btn1         {            position:absolute;            width:100px;            height:30px;            top:5px;            background-color:navy;            color:white;            text-align:center;            line-height:30px;            cursor:pointer;            left:50%;            margin-left:-50px;        }            #tc-btn1:hover             {                background-color:red;                color:green;            }        #tc-main         {            padding:20px;            text-align:center;            background-color:white;        }        #tc-zz         {            position:fixed;            top:0px;            left:0px;            width:100%;            height:100%;            background-color:black;            opacity:0.3;            display:none;            z-index:10;        }    </style></head><body>    <form id="form1" runat="server">        <input  type="button" value="彈出" id="btn1"/>    <div id="tc">    <div id="tc-top">這裡是標題</div>          <div id="tc-main">這裡是內容,可能有好多字啊!!這裡是內容,可能有好多字啊!!這裡是內容,可能有好多字啊!!這裡是內容,可能有好多字啊!!這裡是內容,可能有好多字啊!!這裡是內容,可能有好多字啊!!這裡是內容,可能有好多字啊!!</div>          <div id="tc-bottom">              <div id="tc-btn1">確定</div>          </div>    </div>        <div id="tc-zz"></div>    </form></body></html><script type="text/javascript">    $("#btn1").click(function () {        myalert(‘我是小倩‘,‘小倩:你好!!‘);    });    function myalert(t, c) {        $("#tc-top").text(t);        $("#tc-main").html(c);        $("#tc").animate({ top: "100" }, 500).animate({ top: "90" }, 100).animate({ top: "100" }, 300);        $("#tc-zz").css("display", "block");    }    $("#tc-btn1").click(function () {        $("#tc").animate({ top: "110" }, 200).animate({ top: "-500" }, 500, function () { $("#tc-zz").css("display", "none"); });          });</script>

 

2017-6-4 jQuery 實戰 彈窗製作

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.