【问题标题】:Button stacking in mobile styles too close移动样式中的按钮堆叠太近
【发布时间】:2020-01-18 22:25:37
【问题描述】:

我正在尝试让我的移动电子邮件中的按钮停止如此紧密地堆叠在一起。它在桌面视图中看起来不错,但在移动设备上会切掉按钮之间的任何空间。

我尝试添加 padding-bottom 和 margin-bottoms,但它们最终使移动按钮更大但仍然触动。

   .buttonstyles {
      font-family:arial,helvetica,sans-serif !important;
      font-size: 16px !important;
      color: #FFFFFF !important;
      padding: 10px !important;
    }

此代码当前正在使按钮触摸。

The buttons currently

【问题讨论】:

  • 也请分享您的标记。
  • 尝试在移动媒体查询中管理margin-bottom...
  • 您在处理电子邮件模板吗?

标签: html css email mobile


【解决方案1】:

我认为它会起作用,否则请分享您的代码..

css

.buttonstyles {
  display: inline-block
}

【讨论】:

    【解决方案2】:

    请尝试使用此代码。

    .buttonstyles {
          background:#000;
          color: #FFFFFF;
          padding: 10px ;
          margin:10px;
          float:left;
          border:none;
        }
    <button class="buttonstyles">Demo1</button>
    <button class="buttonstyles">Demo2</button>

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-09-28
      • 2017-01-30
      • 2013-04-26
      • 1970-01-01
      • 1970-01-01
      • 2010-10-05
      • 1970-01-01
      • 2019-02-10
      相关资源
      最近更新 更多