小编Mic*_*ael的帖子

Twitter Bootstrap - 全宽背景(图像)

我现在正在进行一个项目,我正在尝试包括响应式网格在内的很棒的Twitter Bootrtrap.除了一个问题,一切都很好,花花公子.

你如何给.container(保持网格)一个背景颜色?例:

<div class="container green">
    <div class="row">
        <div class="span6">
            <p>This is a test</p>
        </div>
    </div>
    <div class="row">
        <div class="span6">
            <p>This is a test</p>
        </div>
    </div>
</div>

.green{
 background:green;
}
Run Code Online (Sandbox Code Playgroud)

当我向容器添加颜色时,它将变为绿色,但在左侧留下一个边距,大约20px.如何实现全角背景?

html css background twitter-bootstrap

11
推荐指数
1
解决办法
2万
查看次数

动画背景位置适用于jQuery 1.4.4,但不适用于1.7.2

我遇到了一个问题.

我有一个脚本,我正在摆弄.所有运行正常,但只在jQuery 1.4.4上运行.当我向上移动一个版本时,让我们说最新的(1.7.2)脚本将无法运行.是什么赋予了?!

var bouncespeed = 450;

function bounce(currentA) {
    newx = Math.floor(10 * Math.random());
    newy = Math.floor(3 * Math.random());
    newspeed = bouncespeed + Math.floor(10 * Math.random());
    $(currentA).animate({
        backgroundPosition: newx + 'px ' + newy + 'px'
    }, newspeed, 'linear', function() {
        bounce(currentA);
    });
}

$('.bubble').each(

function() {
    $(this).css({
        backgroundPosition: '5px 5px'
    });
    bounce(this);
});
Run Code Online (Sandbox Code Playgroud)

上场时间!:http://jsfiddle.net/mdecler/rgBeW/2/

jquery versions

2
推荐指数
1
解决办法
798
查看次数

标签 统计

background ×1

css ×1

html ×1

jquery ×1

twitter-bootstrap ×1

versions ×1