標籤球-Js外掛程式

來源:互聯網
上載者:User

標籤:

今天上學校的圖書館,看到了一個好玩的東西,特意百度了下,發現叫做“標籤球”,為:

直接代碼如下:

#div1 {position:relative; width:350px; height:350px; border:1px solid #000; margin: 20px auto 0; }#div1 a {position:absolute; top:0px; left:0px; font-family: Microsoft YaHei; color:#000; font-weight:bold; text-decoration:none; padding: 3px 6px; }#div1 a:hover {border: 1px solid #eee; background: #FFF; }#div1 .blue {color:blue;}#div1 .red {color:red;}#div1 .green {color:green;}
<div id="div1">    <a href="#">標籤雲</a>    <a href="#" class="red">PHP</a>    <a href="#">瀑布流</a>    <a href="#">Tab</a>    <a href="#" class="blue">流體布局</a>    <a href="#">SEO</a>    <a href="#" class="red">彩蛋</a>    <a href="#" class="green">JavaScript</a>    <a href="#">miaov</a>    <a href="#" class="red">CSS</a>    <a href="#">asp.net</a>    <a href="#" class="blue">藍色經典</a>    <a href="#">OOP</a>    <a href="#" class="red">Android</a>    <a href="#" class="blue">妙味茶館</a>    <a href="#">dialog</a>    <a href="#" class="blue">淘客</a>    <a href="#">Pin</a>    <a href="#">微博</a>    <a href="#" class="green">IPhone</a></div>
 $(document).ready(function() {    $("#div1").windstagball({            radius:120,            speed:10        });    });
  1. 首先得寫好布局,最外層div樣式position設定為relative
  2. 內層元素position為absolute,這樣才能形成效果,top為0,left為0
  3. 先匯入jquery檔案,再匯入相應的外掛程式檔案
  4. 擷取$("#xxx")元素,並調用windstagball()函數,radius是標籤球的變徑大小,speed顧名思義就是運動的速度。

Demo:http://www.miaov.com/miaov_demo/3dLable/miaov_demo.html

標籤球-Js外掛程式

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.