jqcloud 标签云效果

官网地址: http://mistic100.github.io/jQCloud/index.html
github 地址: https://github.com/lucaong/jQCloud
使用

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<link rel="stylesheet" href="dist/jqcloud.css">
	<script src="jquery2.1.4.js"></script>
	<script src="dist/jqcloud.js"></script>
</head>
<body>
	<div id="tagcloud" style="width: 80%; height: 450px; align-self: center;"></div>
</body>
</html>
<script>
     var word_array = [
          {text: "Lorem", weight: 15},
          {text: "Ipsum", weight: 9, link: "http://jquery.com/"},
          {text: "Dolor", weight: 6, html: {title: "I can haz any html attribute"}},
          {text: "Sit", weight: 7},
          {text: "Amet", weight: 5},
          {text: "Amet", weight: 8},
          {text: "Amet", weight: 9},
          {text: "Amet", weight: 3},
          {text: "Amet", weight: 6},
          // ...as many words as you want
      ];
       $(function() {
        // When DOM is ready, select the container element and call the jQCloud method, passing the array of words as the first argument.
       $("#tagcloud").jQCloud(word_array,{
            shape:'elliptic' //修改形状elliptic''rectangular' 默认 椭圆
        }); }); </script>
<style>
// 自定义字体大小 字体颜色
div.jqcloud span.w10 { color: #488fec; }
div.jqcloud span.w9 { color: #e8e1b6; }
div.jqcloud span.w8 { color: #bd3b39; }
div.jqcloud span.w7 { color: #35bdeb; }
div.jqcloud span.w6 { color: #00c3c5; }
div.jqcloud span.w5 { color: #488fec; }
div.jqcloud span.w4 { color: #e8e1b6; }
div.jqcloud span.w3 { color: #bd3b39; }
div.jqcloud span.w2 { color: #35bdeb; }
div.jqcloud span.w1 { color: #ba3531; }

div.jqcloud span.w10 { font-size: 36px; }
div.jqcloud span.w9 { font-size: 20px; }
div.jqcloud span.w8 { font-size: 28px; }
div.jqcloud span.w7 { font-size: 16px; }
div.jqcloud span.w6 { font-size: 40px; }
div.jqcloud span.w5 { font-size: 18px; }
div.jqcloud span.w4 { font-size: 16px; }
div.jqcloud span.w3 { font-size: 36px; }
div.jqcloud span.w2 { font-size: 24px; }
div.jqcloud span.w1 { font-size: 20px; }
</style>

 

转载于:https://www.cnblogs.com/Kyaya/p/11059833.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值