Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/73.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery 设置动画到顶部_Jquery_Html_Css - Fatal编程技术网

Jquery 设置动画到顶部

Jquery 设置动画到顶部,jquery,html,css,Jquery,Html,Css,js- css- 我想做的是,较小的长方体与大长方体内部的底部对齐,动画发生在上方向,但底部和边距底部没有任何帮助。 这里是链接- 试试这个 .inner { height:100px; width:400px; background-color:#333; margin-bottom:0px; } .outer { height:400px; width:400px; background-color:#999; } 试试这个 .in

js-

css-

我想做的是,较小的长方体与大长方体内部的底部对齐,动画发生在上方向,但底部和边距底部没有任何帮助。 这里是链接-

试试这个

.inner {
    height:100px;
    width:400px;
    background-color:#333;
    margin-bottom:0px;
}

.outer {
    height:400px;
    width:400px;
    background-color:#999;
}
试试这个

.inner {
    height:100px;
    width:400px;
    background-color:#333;
    margin-bottom:0px;
}

.outer {
    height:400px;
    width:400px;
    background-color:#999;
}

定位您的元素:

.inner {
    height:100px;
    width:400px;
    background-color:#333;
    margin-bottom:0px;
    bottom:0;
    position:absolute;
}

.outer {
    height:400px;
    width:400px;
    background-color:#999;
    position:relative;
}

奖金 您可以使用纯CSS实现这一点:

.inner {
    height:100px;
    width:400px;
    background-color:#333;
    position: absolute;
    bottom: 0;
    left: 0;
}

.outer {
    height:400px;
    width:400px;
    background-color:#999;
    position: relative;
}
  • 神奇之处在于:悬停伪类和转换属性
  • 检查一下
    • 定位您的元素:

      .inner {
          height:100px;
          width:400px;
          background-color:#333;
          margin-bottom:0px;
          bottom:0;
          position:absolute;
      }
      
      .outer {
          height:400px;
          width:400px;
          background-color:#999;
          position:relative;
      }
      

      奖金 您可以使用纯CSS实现这一点:

      .inner {
          height:100px;
          width:400px;
          background-color:#333;
          position: absolute;
          bottom: 0;
          left: 0;
      }
      
      .outer {
          height:400px;
          width:400px;
          background-color:#999;
          position: relative;
      }
      
      • 神奇之处在于:悬停伪类和转换属性
      • 检查一下

      如果你能制作一把小提琴,那就很容易了。。。当鼠标悬停时,你想让白色框填满整个空间吗?如果你能创建一个小提琴,那就很容易了。。。当鼠标悬停时,你想让白色框填满整个空间吗?谢谢,这真的很有帮助:)。我很高兴你喜欢它,如果它对你有效,请接受答案。谢谢,这真的很有帮助:)。我很高兴你喜欢它,如果它对你有效,请接受答案。