小编Dre*_*ing的帖子

Firefox flexbox图像宽度

我在使图像占用不超过父容器可用宽度的100%时遇到了一些麻烦.我只注意到Firefox 36(不是IE或Chrome)中的问题.那么它是一个firefox bug还是我错过了什么?

注意:图像不应大于原始大小.

铬:

在此输入图像描述

火狐:

在此输入图像描述

<!DOCTYPE html>
<html>
  <head>
    <style type="text/css">
.container {
  width:300px;
}
.flexbox {
  display:flex;
}

.flexbox .column {
  flex:1;
  background-color: red;
}

.flexbox .middleColumn {
  flex:3;
}

.flexbox .middleColumn img {
  width:auto;
  height:auto;
  max-width:100%;
  max-height:100%;
  align-self: center;
  display: block;
}
    </style>
  </head>
  <body>
    <div class="container">
      <div class="flexbox">
        <div class="column">This is the left column!</div>
        <div class="middleColumn">
          <img src="http://placehold.it/400/333333">
        </div>
        <div class="column">This is the right column!</div>
      </div>
    </div>
  </body>
</html>
Run Code Online (Sandbox Code Playgroud)

html css firefox flexbox

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

Durandal Google Analtyics Tracking

我正在使用Durandal 1.2和Durandal路由器插件,并希望通过Google Analytics跟踪SPA中的网页浏览量: window._gaq.push(['_trackPageview', location.pathname + location.search + location.hash]

我知道我可以监听hashchange事件,甚至可以通过Sammy进行连接.我宁愿不这样做,因为Durandal目前正在被重写以消除对Sammy的依赖.

我的问题是,有没有办法使用Durandal路由器插件设置它?

javascript google-analytics durandal

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

标签 统计

css ×1

durandal ×1

firefox ×1

flexbox ×1

google-analytics ×1

html ×1

javascript ×1