小编nie*_*lsv的帖子

背景图像高度100%

我正在寻找解决我的问题的方法.

我在移动网站上使用twitter bootstrap,这是我在移动视图上的结果:

在此输入图像描述

<div class="row">
    <div class="span4">
        <div class="visible-phone" style="background-image: url('http://upload.tapcrowd.com/upload/catalogimages/719/catalogimagecardealer@2x.png');></div>
        <p class="metadataTitle metacell">
        <span style="display: inline-block" class="ellipsis">Car Dealers</span>
        <span style="table-row"></span></p>
        </div>  
    </div>
</div>
Run Code Online (Sandbox Code Playgroud)

我的图像所在的div的css:

background-size:contain;
background-repeat: no-repeat;
background-position: center center;
width: 100%; 
height: 300px;"
Run Code Online (Sandbox Code Playgroud)

但正如您所看到的,图像与下面的内容之间存在差距,是否有人知道如何解决这个问题?

html css twitter-bootstrap

0
推荐指数
1
解决办法
5343
查看次数

获取类等于 active 的 div 索引

我有一个 twitter bootstrap carousel:

<div id="myCarousel" class="carousel slide">
    <div class="carousel-inner">
       <div class="item">
            <div id="container"></div>
       </div>
       <div class="item active">
            <div id="container2"></div>
       </div>
       <div class="item">
            <div id="container3"></div>
       </div>
    </div>
    <!-- Controls -->
    <a class="left carousel-control" href="#myCarousel" data-slide="prev">«</a>
    <a class="right carousel-control" href="#myCarousel" data-slide="next">»</a>
</div>
Run Code Online (Sandbox Code Playgroud)

现在,当我点击时,例如。一个按钮。我想要带有 class = 'active' 的项目的索引。在此示例中,它将是第二个 div,因此 index = 1(从 0 开始)。

要使用 class = "active" 获取 div,我这样做:

var activediv = $('.item').find('.active');
Run Code Online (Sandbox Code Playgroud)

但是当我想像这样找到元素的索引时:

var index = activediv.index();
Run Code Online (Sandbox Code Playgroud)

我总是在我的控制台中得到“-1”,所以他找不到该项目......但为什么呢?

有谁知道我做错了什么?

javascript indexing jquery find twitter-bootstrap

0
推荐指数
1
解决办法
1722
查看次数

部署Symfony2项目时出现问题

我在部署symfony2项目时遇到了困难http://beachteamvandenbroecke-engels.be/.

我无法访问服务器上的ssh,因此我必须手动将项目文件夹复制到我的网站.
我已导出我的本地数据库并将其插入服务器.
我已经改变了我的设置config/parameters.yml.

但是现在当我想去http://beachteamvandenbroecke-engels.be/web/app_dev.php(没有设置我的.htaccess文件进行重定向)时,我收到此错误:

You are not allowed to access this file. Check app_dev.php for more information.
Run Code Online (Sandbox Code Playgroud)

在我的app_dev.php中:

<?php

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Debug\Debug;

// If you don't want to setup permissions the proper way, just uncomment the following PHP line
// read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information
//umask(0000);

// This check prevents access to debug front controllers that are deployed by accident to production servers.
// Feel free to remove this, extend it, or …
Run Code Online (Sandbox Code Playgroud)

php .htaccess web-deployment symfony

0
推荐指数
1
解决办法
3030
查看次数

Moodle - 检测到编码错误,必须由程序员修复:数据源类不存在

我正在尝试将 Moodle 2.7升级到 3.1。但由于某种原因我不能。这是错误:

Coding error detected, it must be fixed by a programmer: The data source class does not exist.

Debug info: 
Error code: codingerror
Stack trace:
line 498 of /cache/classes/definition.php: coding_exception thrown
line 515 of /cache/classes/helper.php: call to cache_definition::load()
line 480 of /cache/classes/helper.php: call to cache_helper::purge_store()
line 323 of /admin/index.php: call to cache_helper::purge_all()
Run Code Online (Sandbox Code Playgroud)

这可能是什么问题?

php caching datasource moodle purge

0
推荐指数
1
解决办法
5266
查看次数