负的左边距隐藏元素的左侧

时间:2019-06-26 19:25:19

标签: styles margins

我需要使用左负边距,这样我的元素左侧才能在屏幕左侧消失。

我尝试使用相对位置,但不起作用...

<div class="card" id="historyCard">
  <div class="card-header" id="headingOne">
    <h5 class="mb-0">
      <button class="btn btn-link" id="historyBtn" type="button" data-toggle="collapse" data-target="#collapseOne" aria-expanded="false" aria-controls="collapseOne">
        היסטוריה
         <img src="images/clock.png" id="hamNavHistoryImg" width="87" height="87"/>
      </button>
    </h5>
  </div></div>

        #historyCard {
        background-color: #ffb59b;
        border-bottom-right-radius: 50%;
        border-top-right-radius: 50%;
        padding: 30px 0 80px 0;
        margin-top: 10px;
        z-index: 5;
        margin-left:-50px;
    }

screenshot

0 个答案:

没有答案