【问题标题】:jquery align progress barjquery对齐进度条
【发布时间】:2011-10-09 04:57:21
【问题描述】:

这是我的情况:

HTML

<p>Controlla mail</p>
<div class="progressbar"></div>

JS

jQuery(function($) {
    $(".progressbar").progressbar({ value: 10 });
});

http://jsfiddle.net/michelejs/SByqS/

如何将进度条与检查邮件文本对齐?

【问题讨论】:

    标签: jquery html progress-bar alignment


    【解决方案1】:

    这里:DEMO JSFiddle

    或仅使用 jQuery:

    DEMO2

    jQuery(function($) {
        $(".progressbar").progressbar({
            value: 10
        }).css({marginLeft:'100px'}).prev('p').css({float:'left', lineHeight:'34px'});
    
    });
    

    【讨论】:

    • 添加了一个 jQuery 解决方案,如果你更喜欢这种方式。
    【解决方案2】:

    试试http://jsfiddle.net/mraufk/4K8X2/1/

    jQuery(function($) {
        $(".progressbar").progressbar({ value: 10 });
        $(".progressbar").css('width', '85px'); 
    });
    

    【讨论】:

    • @michele:你是不是用“对齐”这个词来表达这个意思?
    • 不抱歉,我希望检查邮件和进度条出现在同一行。没有新行
    • @michele 能否请您发布一张图片(您可以使用图片编辑器,例如 Microsoft Paint)。
    【解决方案3】:

    代码如下:

    jQuery(函数($) {

    $(".progressbar").progressbar({ value: 10 });

    $(".progressbar").css('margin-left', '90px');

    $('p').css('float','left');

    });

    【讨论】:

      猜你喜欢
      • 2011-10-09
      • 1970-01-01
      • 1970-01-01
      • 2014-03-19
      • 1970-01-01
      • 1970-01-01
      • 2020-04-26
      • 2020-09-17
      • 1970-01-01
      相关资源
      最近更新 更多