【问题标题】:Move the button to right side of screen [duplicate]将按钮移动到屏幕右侧[重复]
【发布时间】:2022-01-25 03:41:44
【问题描述】:

我尝试移动屏幕右侧的按钮,如上面的图标,我尝试了 p-grid p-align-end 垂直容器,p-align-end 但我没有成功。有什么帮助吗?

 <div class="p-grid p-align-center">
          <div class="p-col-12">
              <button pButton type="button"  class="p-button-primary" label="{{changeQuantity}}">
              </button>
            </div>
        </div>

【问题讨论】:

    标签: css bootstrap-4


    【解决方案1】:

    Bootstrap 具有可以添加到任何项目的 .float-right 类。

    见我附上的例子:

     <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
     
    <div class="p-grid p-align-center">
      <div class="p-col-12">
        <button pButton type="button"  class="p-button-primary float-right" label="{{changeQuantity}}">
        </button>
      </div>
    </div>

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-05-06
      • 2012-01-07
      • 2020-03-01
      • 1970-01-01
      • 1970-01-01
      • 2022-11-04
      相关资源
      最近更新 更多