<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>marginTop</title>
<style type="text/css">
#con {
width:300px;
height:300px;
border:solid 1px #F00;
overflow:hidden;
}
#conc img {
width:300px;
height:300px;
}
#show {
width:300px;
height:200px;
border:solid 1px #00f;
}
</style>
<script type="text/javascript" src="js/jquery1.6.1.js"></script>
<script type="text/javascript">
$(function() {
var num = 0;
var html = '';
//setInterval(function() {
$('#conc img').animate({
//marginTop : '-=' + $('#con').
JQuery的animate的marginTop自增动画在FF下的另类表现
最新推荐文章于 2022-08-29 22:28:56 发布
本文探讨了在Firefox浏览器中,使用JQuery的animate方法改变元素marginTop属性时出现的一种特殊动画效果。当marginTop值超过容器高度的负值时,元素会先向上移动,然后返回到可视区域。通过实验和分析,揭示了Firefox对于块级元素垂直margin的处理方式,提出了解决此类问题的链接资源。
摘要由CSDN通过智能技术生成