Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/38.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 Animate()显示同一类中其他元素的粘性行为_Jquery_Css_Web - Fatal编程技术网

JQuery Animate()显示同一类中其他元素的粘性行为

JQuery Animate()显示同一类中其他元素的粘性行为,jquery,css,web,Jquery,Css,Web,出于某种原因,所有.internal card元素都显示了某种动画,就好像它们都在不规则地计算它们的位置,而不仅仅是鼠标悬停在上面的一个元素被清晰地动画化一样。 你知道我该怎么解决这个问题吗 HTML: 这是.JS $(document).ready(function() { $('.inner-card').mouseenter(function() { $(this).animate({ height: "+=0.5em" }, 5

出于某种原因,所有
.internal card
元素都显示了某种动画,就好像它们都在不规则地计算它们的位置,而不仅仅是鼠标悬停在上面的一个元素被清晰地动画化一样。 你知道我该怎么解决这个问题吗

HTML:

这是.JS

$(document).ready(function() {
   $('.inner-card').mouseenter(function() {
       $(this).animate({
        height: "+=0.5em"
     },
     500,
     'linear'
     );
   });
   $('.inner-card').mouseleave(function() {
       $(this).animate({
           height: "-=0.5em"
       },
       500,
       'linear'
       ); 
   }); 
});

我相信这是因为
外部卡
元素上的
显示:内联块
属性

它的一个解决方法是使用,
float:left

因此,我所做的是将
.outer card
的css代码块更新为:

.outer-card{
    border:solid;
    display: block;
    float: left;
    text-align: center;
    width: 1em;
    background-image: none;
    border-radius: 0.2em;
    margin: 0 6px;
}

工作

我相信这是因为
外部卡
元素上的
显示:内联块
属性

它的一个解决方法是使用,
float:left

因此,我所做的是将
.outer card
的css代码块更新为:

.outer-card{
    border:solid;
    display: block;
    float: left;
    text-align: center;
    width: 1em;
    background-image: none;
    border-radius: 0.2em;
    margin: 0 6px;
}

工作

我相信这是因为
外部卡
元素上的
显示:内联块
属性

它的一个解决方法是使用,
float:left

因此,我所做的是将
.outer card
的css代码块更新为:

.outer-card{
    border:solid;
    display: block;
    float: left;
    text-align: center;
    width: 1em;
    background-image: none;
    border-radius: 0.2em;
    margin: 0 6px;
}

工作

我相信这是因为
外部卡
元素上的
显示:内联块
属性

它的一个解决方法是使用,
float:left

因此,我所做的是将
.outer card
的css代码块更新为:

.outer-card{
    border:solid;
    display: block;
    float: left;
    text-align: center;
    width: 1em;
    background-image: none;
    border-radius: 0.2em;
    margin: 0 6px;
}

工作

尝试将
垂直对齐:top
添加到
外部卡
css类

这是因为
.outer类
显示:内联块
,而
垂直对齐
属性适用于内联元素


尝试将
垂直对齐:top
添加到
外部卡
css类

这是因为
.outer类
显示:内联块
,而
垂直对齐
属性适用于内联元素


尝试将
垂直对齐:top
添加到
外部卡
css类

这是因为
.outer类
显示:内联块
,而
垂直对齐
属性适用于内联元素


尝试将
垂直对齐:top
添加到
外部卡
css类

这是因为
.outer类
显示:内联块
,而
垂直对齐
属性适用于内联元素