简体   繁体   English

如何在jQuery中创建气球?

[英]How to Create balloons in jQuery?

i'm using Java with Jquery, 我正在使用Java和Jquery,

Actually i want to show indicator(ballon type) see below image.. 其实我想显示指标(气球型)见下图。 图片

Above image file show some indication. 上面的图像文件显示一些指示。

Actually in my java code giving some integer to Jquery then it will displayed. 实际上在我的java代码中给Jquery一些整数然后就会显示出来。

Please help me is their is any Plugin to show integer values like that.. 请帮帮我是他们的任何插件显示这样的整数值..

Update DEMO with number replaced by JQUERY 更新DEMO,数字由JQUERY替换

Here is the css solution, if you like. 如果你愿意,这是css解决方案。 DEMO http://jsfiddle.net/yeyene/DfSda/1/ 演示http://jsfiddle.net/yeyene/DfSda/1/

Add <span class="ballons"></span> inside your button, and replace the dynamic count value. 在按钮内添加<span class="ballons"></span> ,并替换动态计数值。

.ballons {
    float:right;
    margin:-20px 8px 0 0;
    line-height:30px;
    padding:0 10px;
    border-radius: 30px;
    border:3px solid #fff;
    border-radius: 30px;
    -moz-border-radius: 30px; 
    -webkit-border-radius: 30px;
    -ms-border-radius: 30px;
    -o-border-radius: 30px;
    background:red;
    color:#fff;
    text-align:center;
    -moz-box-shadow:    1px 1px 3px 3px #ccc;
    -webkit-box-shadow: 1px 1px 3px 3px #ccc;
    box-shadow:         1px 1px 3px 3px #ccc;
}

http://file.urin.take-uma.net/jquery.balloon.js-Demo.html http://file.urin.take-uma.net/jquery.balloon.js-Demo.html

This is a nice plugin that helps you create balloons. 这是一个很好的插件,可以帮助您创建气球。

Modified @yeyene's answer Demo This will give balloon look 修改@ yeyene的答案演示这将给出气球外观

.ballons {
    float:left;
    margin:10px 8px 0 0;
    height:150px;
    width:100px;
    border-radius: 30px;
    border:3px solid #fff;
    border-radius: 50%;
    -ms-border-radius: 50%;
    -o-border-radius: 50%;
    -moz-border-radius: 50%; 
    -webkit-border-radius: 50%;
    background:red;
    color:#fff;
    text-align:center;
    -moz-box-shadow:    1px 1px 3px 3px #ccc;
    -webkit-box-shadow: 1px 1px 3px 3px #ccc;
    box-shadow:         1px 1px 3px 3px #ccc;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM