保证金顶部和保证金底部不适用于内部元素

时间:2017-11-02 17:22:43

标签: javascript jquery html css css3

我想把我的微调器向上移动。移动圆圈使其以img为中心是负值还是正值。它适用于我的CodePen但不适用于Webpage。我读到了一些可能的解决方案,例如添加display: inline-block / display: blockoverflow: hidden,但它们似乎不适用于我的代码。为什么Codepen上运行的代码无法在我的网页上运行?

.bodyImage1 {
  float: right;
  margin-right: -10%;
  width: 250px;
}

.container {
  position: relative;
}

/*Advance animation*/

.connector3 {
  position: absolute;
  display: inline-block;
  margin-top: 360px;
  width: 0;
  height: 2px;
  animation: drawConnector 0.7s;
  animation-fill-mode: forwards;
  background: linear-gradient(to right, #0083f5 15%, #f57300 105%);
}

.spinner1 {
  align-items: center;
  border: .3em solid transparent;
  border-top: .3em solid #f57300;
  border-right: .3em solid #f57300;
  border-radius: 100%;
  display: flex;
  justify-content: center;
}

.spinnerOut {
  animation: spinnerOne 3s linear infinite;
  margin-top: -50%;
  margin-left: 150%;
  height: 3em;
  width: 3em;
}

.spinnerMid {
  animation: spinnerOne 5s linear infinite;
  height: 2.4em;
  width: 2.4em;
}

.spinnerInn {
  animation: spinnerOne 5s linear infinite;
  height: 1.8em;
  width: 1.8em;
}

@keyframes spinnerOne {
  0% {
    transform: rotate(0deg)
  }
  100% {
    transform: rotate(360deg)
  }
}
<div class="connector3 block-anim invis">
  <div class="spinner1 spinnerOut invis">
    <div class="spinner1 spinnerMid">
      <div class="spinner1 spinnerInn"></div>
    </div>
  </div>
</div>

1 个答案:

答案 0 :(得分:0)

有一个margin-top:对您网站上的微调器很重要。更改它可以移动微调器。

Site.css,美化,第27301行

.spinnerOut {
    animation: spinnerOne 3s linear infinite;
    margin-top: -225px !important;
    margin-left: 150%;
    height: 3em;
    width: 3em;
}

enter image description here

enter image description here