【问题标题】:How to make three div with 2nth div is Add and Remove button in CSS [closed]如何使用第 2 个 div 制作三个 div 是 CSS 中的添加和删除按钮 [关闭]
【发布时间】:2017-04-28 10:59:11
【问题描述】:

我想让它像下图一样:

【问题讨论】:

  • 请张贴您的代码的 sn-ps

标签: html css mobile


【解决方案1】:
<div class="flex">
    <div class="left">List A</div>
    <div class="center">
      <div class="left-arrow"><<</div>
      <div class="right-arrow">>></div>
    </div>
    <div class="right">List B</div>
</div>

css

.flex{
  display: flex;
}
.left{
  width: 40%;
  height: 300px;
}
.right{
  width: 40%;
  height: 300px;
}
.center{
  width: 10%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 300px;
}
.center .left-arrow{
  margin-bottom: 15px;
}

@media screen and (max-width: 375px){
  .flex{
    flex-direction: column;
  }
  .left,.right,.center{
    width: 100%;
  }
  .center{
    padding: 15px 0;
  }
  .center .left-arrow{
    margin: 0;
    margin-right: 15px;
  }
}

【讨论】:

    【解决方案2】:

    我更喜欢使用其他 html 文件在手机上显示。:P

    【讨论】:

    • 老兄,给我更多的控制权。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多