jQuery-Tools-overlay 使用介绍 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
本文标签:overlay 复制代码 代码如下: <!DOCTYPE html> <html> <head> <title>jQuery Tools standalone demo</title> <!-- include the Tools --> <script src="http://cdn.jquerytools.org/1.2.7/full/jquery.tools.min.js"></script> <!-- standalone page styling (can be removed) --> <link rel="stylesheet" type="text/css" href="./overlay-basic.css"/> <style> /* some styling for triggers */ #triggers { text-align:center; } #triggers img { cursor:pointer; margin:0 5px; background-color:#fff; border:1px solid #ccc; padding:2px; -moz-border-radius:4px; -webkit-border-radius:4px; } /* styling for elements inside overlay */ .details { position:absolute; top:15px; right:15px; font-size:11px; color:#fff; width:150px; } .details h3 { color:#aba; font-size:15px; } </style> </head> <body><!-- trigger elements --> <div id="triggers"> <img src="http://farm4.static.flickr.com/3651/3445879840_7ca4b491e9_m.jpg" rel="#mies1"/> <img src="http://farm4.static.flickr.com/3346/3449388113_71a06b8548_m.jpg" rel="#mies2"/> </div> <!-- overlays --> <div class="simple_overlay" id="mies1"> <img src="http://farm4.static.flickr.com/3651/3445879840_7ca4b491e9.jpg" /> <div class="details"> <h3>The Barcelona Pavilion</h3> <h4>Barcelona, Spain</h4> <p> The Barcelona Pavilion, designed by Ludwig Mies van der Rohe, was the German Pavilion for the 1929 International Exposition in Barcelona, Spain. It was an important building in the history of modern architecture. </p> <p> Several critics, historians and modernists have declared it "the most beautiful building of the century" </p> </div> </div> <div class="simple_overlay" id="mies2"> <img src="http://farm4.static.flickr.com/3346/3449388113_71a06b8548.jpg" /> <div class="details"> <h3>The Barcelona Pavilion</h3> <h4>Barcelona, Spain</h4> <p> Another unique feature of this building is the <em>exotic materials Mies chose to use</em>. </p> <p> Plates of high-grade stone materials like veneers of Tinos verde antico marble and golden onyx as well as tinted glass of grey, green, white, in addition to translucent glass, perform exclusively as spatial dividers. </p> </div> </div> <script> $(document).ready(function() { $("img[rel]").overlay({ closeOnClick:false, mask: darkred }); }); </script> </body> </html> CSS 复制代码 代码如下: /* the overlayed element */ .simple_overlay { /* must be initially hidden */ display:none; /* place overlay on top of other elements */ z-index:10000; /* styling */ background-color:#333; width:675px; min-height:200px; border:1px solid #666; /* CSS3 styling for latest browsers */ -moz-box-shadow:0 0 90px 5px #000; -webkit-box-shadow: 0 0 90px #000; } /* close button positioned on upper right corner */ .simple_overlay .close { background-image:url(./close.png); position:absolute; right:-15px; top:-15px; cursor:pointer; height:35px; width:35px; } 关闭的css的命名: xxx .close 性 以下列出的是所有可用的属性选项:
事件 确保你已经阅读 大约 事件 jQuery工具 。 所有事件监听器接收 这个 事件 对象 作为第一个参数并没有其他参数 为叠加 。
首先确保你已经了解你自己 与 jQuery工具 脚本 。 以下列出的是所有可用的API方法:
tab:传送门 tab(幻灯片):传送门 tooltip:传送门 overlay:传送门 dateinput:传送门 在携程做着framework2.0,研究的却是framework4.0,当时是怎么想的T.T 。全是TMD老技术和堆代码 |