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类
是显示:内联块
,而垂直对齐
属性适用于内联元素