小编Zar*_*bat的帖子

如何在flexbox中为较小的屏幕包装项目?

我正在尝试为不同的resize创建一个布局.我需要在这些图片中找到结果:

flexbox结果

我有这个代码:

.container {
  position: relative;
  display: flex;
  align-items: stretch;
}
.item {
  background-color: black;
  box-sizing: border-box;
  padding: 20px;
  flex: 2;
  color: #fff;
}
.item:nth-child(2) {
  background-color: grey;
  flex: 1
}
.item:nth-child(3) {
  background-color: green;
  flex: 0.5;
}
@media screen and (max-width: 990px) {
  .container {
    height: auto;
    display: table;
  }
  .item:nth-child(2) {
    float: left;
  }
  .item:nth-child(3) {
    float: right;
  }
}
Run Code Online (Sandbox Code Playgroud)
<section class="container">
  <div class="item">
    <h2>title1</h2>
    <hr>You'll notice that even though this column has far more content in it, …
Run Code Online (Sandbox Code Playgroud)

html css css3 flexbox

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

安装后的离子问题

我需要一些帮助来解决我的mac上的离子问题.对于我从终端使用ionic启动的每个命令,我都会收到如下所示的相同错误.

例如,即使我发出命令ionic -v,我也会收到:

$ ionic -v
/usr/local/lib/node_modules/ionic/dist/index.js:24
        const [xcode, iosDeploy, iosSim,] = yield Promise.all([
              ^

SyntaxError: Unexpected token [
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:387:25)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)
    at require (internal/module.js:16:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/ionic/bin/ionic:8:11)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
Run Code Online (Sandbox Code Playgroud)

我检查了文件/usr/local/lib/node_modules/ionic/dist/index.js,但一切都很好.即使有这个解析错误,我甚至尝试卸载并重新安装离子而没有成功.有人可以给我一些建议吗?

syntax-error ionic-framework

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

标签 统计

css ×1

css3 ×1

flexbox ×1

html ×1

ionic-framework ×1

syntax-error ×1