【问题标题】:how to get rid of white space in a popover menu?如何摆脱弹出菜单中的空白?
【发布时间】:2020-10-10 13:25:57
【问题描述】:

我正在尝试消除弹出框中的白色边距/装订线,以便黄色按钮跨越弹出框的整个宽度。我怎样才能做到这一点?

代码:

  <button type="button" data-html="true" class="btn btn-secondary btn-sm btn mr-1 "
      data-trigger="focus" data-container="body" data-toggle="popover" data-placement="bottom"
      data-content= '<div style="display: none">
<ul class="list-group custom-popover ml-0 px-0">
  <li class="list-group-item"><a href="profile.php">Profile</a></li>
  <li class="list-group-item"><a href="includes/logout.php">Logout</a></li>
</ul>
</div>'>
<?php echo 'popover menu'?></button>

【问题讨论】:

    标签: layout bootstrap-4 popover


    【解决方案1】:

    要更改弹出框的样式,您可以只使用 CSS。您的问题的解决方案是将其添加到您的自定义 css 文件中。

    .popover-body{
      padding: 0px;
    }
    

    如果您想知道当 boostrap 克里特弹出框时所有的样式,您可以在您从 boostrap 下载的文件夹中名为 _popover.scss 的文件中查看它们。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-03-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-08-21
      • 1970-01-01
      • 2021-02-07
      相关资源
      最近更新 更多