PHP & JavaScript Room :: 設置サンプル

実行結果

設置サンプル

参照:Create a jQuery Popup Bubble

▼RSSアイコンにマウスオーバーすると、吹き出しがポップアップ表示されます。

RSS Feed Subscribe to our RSS Feed

設置サンプルのソース

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <meta http-equiv="Content-Language" content="ja" />
      <meta http-equiv="Content-Script-Type" content="text/javascript" />
      <meta http-equiv="Content-Style-Type" content="text/css" />
      <meta http-equiv="imagetoolbar" content="no" />
      <title>設置サンプル</title>
      <link rel="stylesheet" type="text/css" href="/content/lib/global.css">
      <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
       <script type="text/javascript">
         $(document).ready(function(){
            $(".rss-popup a").hover(function() {
               $(this).next("em").animate({opacity:"show", top:"-60"}, "slow");
            },
            function(){
               $(this).next("em").animate({opacity:"hide", top:"-70"}, "fast");
            });
         });
         </script>
         <style type="text/css">
            body { background-color:#fff; }
         .rss-popup { margin:100px 0; padding:0; width:100px; list-style:none; position:relative; }
         .rss-popup em { background:url(/content/img/ajax/popupbubble.png) no-repeat; width:100px; height:49px; position:absolute; top:-70px; left:-0px; text-align:center; text-indent:-9999px; z-index:2; display:none; }
         #rss-icon { width:42px; height:42px; background:url(/content/img/ajax/popupbubble_icon.png) no-repeat 0 0; text-indent:-9999px; margin:0 auto; display:block; }
      </style>
   <link rel="stylesheet" type="text/css" href="/common/css/example.css"></head>
   <body id='example3' class='example'><div class="ads" style="margin:32px auto;text-align:center;"></div><h1 class='h'><a href='/'>PHP &amp; JavaScript Room</a> :: 設置サンプル</h1>
<h3 class='h'>実行結果</h3>
      <div id="wrap">
         <h1>設置サンプル</h2>
         <p>参照:<a href='http://www.dvq.co.nz/web-design/create-a-jquery-popup-bubble-effect/'>Create a jQuery Popup Bubble</a></p>
         <p>▼RSSアイコンにマウスオーバーすると、吹き出しがポップアップ表示されます。</p>
         <div class="rss-popup">
            <a href="feed-link" id="rss-icon">RSS Feed</a>
            <em>Subscribe to our RSS Feed</em>  
         </div>
      </div>
   </body>
</html>