小编dcl*_*son的帖子

响应图像定位在图像上

我已经设置了一个jsfiddle,我正在尝试做什么:

http://jsfiddle.net/MgcDU/3936/

#counter {
    position: relative;
}
#over {
    position:absolute;
    left:33%;
    top:43%;
}
Run Code Online (Sandbox Code Playgroud)

猫的图像是我的背景图像,它在浏览器调整大小时调整大小.

球图像绝对位于猫的上方.如何让球图像调整大小并保持在我的默认位置?

css responsive-design

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

jQuery等于高度响应div行

我知道这个问题已被问了一百万次,但我正在寻找更具体的东西.

由于我的网站完全响应,我需要基于每行调整div,而不是将所有设置为一个高度.

我使用以下修改代码来设置容器中所有div的高度:

$.fn.eqHeights = function() {
    var el = $(this);
    if (el.length > 0 && !el.data('eqHeights')) {
        $(window).bind('resize.eqHeights', function() {
            el.eqHeights();
        });
        el.data('eqHeights', true);
    }
    return el.each(function() {
        var curTop = 0;
        var curHighest = 0;
        $(this).children().each(function(indx) {
            var el = $(this),
                elHeight = el.height('auto').outerHeight();

            var thisTop = el.position().top;
            if (curTop > 0 && curTop != thisTop) {
                curHighest = 0;
            }

            if (elHeight > curHighest) {
                curHighest = elHeight;
            }

            curTop = thisTop;

        }).height(curHighest);
    });
};
Run Code Online (Sandbox Code Playgroud)

我必须var …

javascript jquery responsive-design equal-heights

8
推荐指数
1
解决办法
5876
查看次数

自定义帖子类型年/月存档

我的Wordpress网站上有自定义帖子类型"新闻".我正在使用高级自定义字段插件将元数据添加到每个帖子.

我想创建一个新闻项目数组作为存档:

[2013]
    [January] => 5
[2012]
    [January] => 20
    [February] => 10
[2011]
    [April] => 30
Run Code Online (Sandbox Code Playgroud)

我设法让这个工作使用:

    global $wpdb;
    $news = $wpdb->get_results(
        "SELECT wp_posts.post_date, COUNT(wp_posts.ID) as count
         FROM $wpdb->posts
         WHERE
         wp_posts.post_type = 'news' AND
         wp_posts.post_status = 'publish' AND
         wp_posts.post_date <= CURDATE() AND
         wp_posts.post_date >= DATE_SUB(CURDATE(), INTERVAL 3 YEAR)
         GROUP BY YEAR(wp_posts.post_date), MONTH(wp_posts.post_date)
         ORDER BY wp_posts.post_date DESC", 
         ARRAY_A);

    $archive = array();
    foreach ($news as $post):
        $year = date('Y', strtotime($post['post_date']));      
        $month = date('m', strtotime($post['post_date']));     
        $month_name = date('F', strtotime($post['post_date']));
        $post['url'] = 'NOT …
Run Code Online (Sandbox Code Playgroud)

sql wordpress .htaccess mod-rewrite custom-post-type

6
推荐指数
1
解决办法
7579
查看次数

固定位置容器内的可滚动内容

我有一个 Bootstrap 构建的网站,其中包含一个覆盖页脚,单击页脚菜单即可打开该页脚。

页脚内部是一个可滚动的内容区域,当在可滚动 div 上设置固定高度时,该区域可以正常工作。由于网站是响应式的,我需要这个可滚动区域的百分比高度似乎延伸到可见窗口之外。

一个例子在这里: http: //jsfiddle.net/JUESu/5/

#footer-content {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: black;
    opacity: 1;
    display: block;
    color: #7f7f7f;
    height:85%;
}

.scrollable {
    overflow-y: scroll;
    height: 50%; /* Doesnt Work */
    /*height: 300px; /* Works */
    width: 95%;
    background: red;
}
Run Code Online (Sandbox Code Playgroud)

如何在固定位置容器内放置可滚动的 div?

css css-position scrollable responsive-design

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

PayPal IPN折扣变量

我正在使用PayPal IPN处理我网站上的付款.我希望用户能够输入折扣代码和传递给PayPal并计算的价值(金额或百分比).

我一直在寻找网络,但似乎只能找到以下内容:

Use discount_amount_cart to charge a single discount amount for the entire cart.

Use discount_amount_x to set a discount amount associated with item x

Use discount_rate_cart to charge a single discount percentage for the entire cart.

discount_rate_cart - Applies to entire cart however, this variable will only work with the "Upload" Method. Not the standard Add to Cart variables.
Run Code Online (Sandbox Code Playgroud)

在我的请求字符串中测试这些后:

...&discount_amount_cart=10&...

PayPal似乎不承认这个折扣.这在PayPal IPN中是否真的存在?

谢谢你的帮助!

paypal paypal-sandbox paypal-ipn

4
推荐指数
1
解决办法
2476
查看次数

zlib错误在共享主机上安装GIT

我正在尝试按照本指南在我的UK2共享主机服务器上安装git:

http://www.randallkent.com/development/install-git-on-a-cpanel-shared-hosting-account

当我收到以下错误时,我已经完成了最后几步'make'和'make install':

config.status: executing config.mak.autogen commands
* new build flags
CC credential-store.o
In file included from credential-store.c:1:
cache.h:19:18: warning: zlib.h: No such file or directory
In file included from credential-store.c:1:
cache.h:21: error: expected specifier-qualifier-list before ‘z_stream’
make: *** [credential-store.o] Error 1
Run Code Online (Sandbox Code Playgroud)

我的托管服务提供商为我启用了zlib压缩,但我仍然无法安装git.

是否有我遗漏的东西或在我的托管服务器上不可能?

非常感谢

unix git zlib

3
推荐指数
1
解决办法
9735
查看次数