我一直在尝试使这个示例工作,但根本没有成功(使用 vs2010):
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %>
<!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 runat="server">
<title></title>
<style type="text/css">
#algo
{
width: 200px;
height: 200px;
color: White;
background-color: Red;
border: 4px solid black;
margin: 100px 0px 0px 80px;
}
</style>
<script type="text/javascript" src="jquery.js">
$(document).ready(function () {
$('#algo').animate({ 'margin-top': '300px', 'margin-left': '400px' }, 1000);
}); </script>
</head>
<body>
<form id="form1" runat="server">
<div id="algo">
<p>
lol</p>
</div>
</form>
</body>
</html>
我也尝试过缩小版本,但它仍然无法正常工作......我有什么遗漏吗?