波旁威士忌两列布局与flexbox

时间:2015-09-29 09:27:35

标签: flexbox bourbon

我想使用Bourbon创建两个使用flexbox的列布局。这是代码:

.module_grid {
  margin: 0 3rem 4rem 0;
  flex: 0 0 100%;
  @include display(flex);
  @include flex-direction(column);
  @include align-items(flex-start);
  @include justify-content(flex-start);
  .module_grid_item {
    @include flex(1);
    flex: 0 0 50%;
    padding: 3rem 0 0 3rem;
    width: 50%; 
    .module_header {
      -webkit-column-break-inside: avoid;
    }
  }
  .module_grid_item.double_module {
    flex: 0 0 100%;
    width: 100%; 
  }
}

这里的问题是我总是将项目显示在一列中。 请帮忙吗?

1 个答案:

答案 0 :(得分:0)

我想你想要

@include flex-direction(row);

而不是row wv.setDownloadListener(new DownloadListener() { @Override public void onDownloadStart(String url, String userAgent, String contentDisposition, String mimeType, long contentLength) { DownloadManager.Request request = new DownloadManager.Request(Uri.parse(url)); request.setMimeType(mimeType); //------------------------COOKIE!!------------------------ String cookies = CookieManager.getInstance().getCookie(url); request.addRequestHeader("cookie", cookies); //------------------------COOKIE!!------------------------ request.addRequestHeader("User-Agent", userAgent); request.setDescription("Downloading file..."); request.setTitle(URLUtil.guessFileName(url, contentDisposition, mimeType)); request.allowScanningByMediaScanner(); request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, URLUtil.guessFileName(url, contentDisposition, mimeType)); DownloadManager dm = (DownloadManager) getSystemService(DOWNLOAD_SERVICE); dm.enqueue(request); Toast.makeText(getApplicationContext(), "Downloading File", Toast.LENGTH_LONG).show(); } }); 的值设置了从左到右的方向,正如here所解释的那样。