小编mav*_*ick的帖子

IE9不支持显示:inline-flex吗?

我一直在寻找StackOverflow,甚至可以找到display: inline-flex;在IE9中工作的地方.我在此之前发布了一个问题,当我在动态扩展宽度时遇到问题,在这里提问.

答案帮助了我,谢谢你,无论你是谁!既然我已经解决了这个问题,并且它在Chrome,Opera,Mozilla,Safari,IE10 +中运行良好,我仍然无法在IE9中完成这项工作.

我也尝试添加预修为display: inline-flex;,如display: -webkit-inline-box,-ms-inline-flexbox等.

我解决了整个交易的问题是width: auto;display: inline-flex;

在这里工作小提琴

如何让它在IE9中工作?

css internet-explorer css3 internet-explorer-9 flexbox

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

React:每隔4列渲染一个新行

我正在使用react,我希望render每隔四列新增一行.

我的代码:

function Product(props) {
  const content = props.products.map((product) => (
        <div className="row" key={product.id}>       
          <article key={product.id} className="col-md-3"></article>
        </div> )
  );
  return (
    <div>
        {content}
    </div>
  );
}
Run Code Online (Sandbox Code Playgroud)

我通过传递一个看起来像这样的条件尝试了这种方法:

if (product.id % 4 == 1),在列周围,但它不起作用......

这就是我想要发生的事情:

<div class="row">
<div class="col-md-3"></div>
<div class="col-md-3"></div>
<div class="col-md-3"></div>
<div class="col-md-3"></div>
</div>
<div class="row">
<div class="col-md-3"></div>
<div class="col-md-3"></div>
<div class="col-md-3"></div>
<div class="col-md-3"></div>
</div>
Run Code Online (Sandbox Code Playgroud)

twitter-bootstrap reactjs

5
推荐指数
3
解决办法
5250
查看次数

安装pg -v 0.17.1

我正在使用/我想使用Postgresql作为数据库,但是当我输入"bundle install"或"bundle update"时,我收到此错误,我该怎么做才能解决这个问题?:)

    Installing pg (0.17.1) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /usr/local/rvm/rubies/ruby-1.9.3-p392/bin/ruby extconf.rb 
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
 --with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir …
Run Code Online (Sandbox Code Playgroud)

ruby postgresql ruby-on-rails bundle-install pg

3
推荐指数
2
解决办法
6643
查看次数

保持滚动到同一高度的顶部按钮?

我的按钮有问题.我想要的是当高度上的窗户尺寸改变时,如何强制按钮保持在同一高度?当高度改变时,我不希望它跟随或被压下......

http://jsfiddle.net/ccq9cs9L/3/

HTML

<a href="#" class="scrollToTop hidden-phone">
    <span class="icon icon-arrow-up-white"></span>
</a>
<div class="myDiv">
    <div class="myContent">
        a lot of text
    </div>
</div>
Run Code Online (Sandbox Code Playgroud)

CSS

a.scrollToTop {
    content: "";
    z-index: 1000;
    width: 60px;
    height: 45px;
    background: #78b209;
    position: fixed;
    top: 35.5%;
    right: 0;
    display: none;
}
Run Code Online (Sandbox Code Playgroud)

JavaScript的

$(document).scroll(function(e) { // This is scrollToTop button
    e.preventDefault();
    if ($(this).scrollTop() > 100) {
        $('.scrollToTop').fadeIn(); 
    } else {
        $('.scrollToTop').fadeOut(); 
    }
});
$('.scrollToTop').click(function () { // Scroll to top with ease
    $('html, body').animate({ scrollTop: 0 }, 1000, 'easeOutExpo'); …
Run Code Online (Sandbox Code Playgroud)

html javascript css jquery scroll

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