欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

jQuery實(shí)現(xiàn)帶遮罩層效果的blockUI彈出層示例【附demo源碼下載】

 更新時(shí)間:2016年09月14日 17:11:49   作者:朱羽佳  
這篇文章主要介紹了jQuery實(shí)現(xiàn)帶遮罩層效果的blockUI彈出層,可實(shí)現(xiàn)帶有彈出遮罩層效果的彈出對(duì)話框功能,并附帶demo源碼供讀者下載參考,需要的朋友可以參考下

本文實(shí)例講述了jQuery實(shí)現(xiàn)帶遮罩層效果的blockUI彈出層。分享給大家供大家參考,具體如下:

首先先附上代碼:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
   <title>blockUI(彈出層)</title>
   <style type="text/css">
   #demo {
     width:100px;
     height:24px;
     text-align:center;
   }
   #displayBox{
     display:none;
   }
   </style>
 </head>
 <body>
   <button id="demo">點(diǎn)擊彈出</button>
   <div id="displayBox">
     這里是彈出層顯示的內(nèi)容?。?!<br /><br /><br /><a href="javascript:void(0);" onclick="$.unblockUI();return false;" title="點(diǎn)擊關(guān)閉">點(diǎn)擊關(guān)閉</a>
   </div>
 </body>
 </html>
 <script type="text/javascript" src="jquery-1.7.2.min.js"></script>
 <script type="text/javascript" src="jquery.blockUI.js"></script>
 <script type="text/javascript">
 $(function(){
   $('#demo').click(function(){
     $.blockUI({
       message: $('#displayBox'),
       css: {
         width: '500px',
         height: '100px',
         backgroundColor: '#eee',
         border: '1px solid red',
         color: 'green',
         textAlign: 'center',
         cursor: 'default'
       }
     });
   });
 })
 </script>

運(yùn)行效果圖如下:

參數(shù)說(shuō)明如下:

message = 需要彈出的內(nèi)容

css = 彈出內(nèi)容的樣式,其中屬性需要寫(xiě)成 js 的形式,如 background-color => backgroundColor

$.unblockUI() = 關(guān)閉彈層

完整實(shí)例代碼點(diǎn)擊此處本站下載。

再附上官網(wǎng)地址:http://www.malsup.com/jquery/block/

更多關(guān)于jQuery相關(guān)內(nèi)容感興趣的讀者可查看本站專題:《jQuery窗口操作技巧總結(jié)》、《jQuery拖拽特效與技巧總結(jié)》、《jQuery常用插件及用法總結(jié)》、《jquery中Ajax用法總結(jié)》、《jQuery表格(table)操作技巧匯總》、《jQuery擴(kuò)展技巧總結(jié)》、《jQuery常見(jiàn)經(jīng)典特效匯總》、《jQuery動(dòng)畫(huà)與特效用法總結(jié)》及《jquery選擇器用法總結(jié)

希望本文所述對(duì)大家jQuery程序設(shè)計(jì)有所幫助。

相關(guān)文章

最新評(píng)論