我试图在页面加载时淡出图像。我是 Jquery 的新手,但我需要一些帮助,因为我没有在 google 中找到有效的答案,我错过了什么
WebForm1.aspx
@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="Zzz.WebForm1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript" id="fadeout">
$(body).ready(function () {
$('#Image1').fadeOut(3000);
});
</script>
</head>
<body onload="fadeout">
<form id="form1" runat="server">
<asp:Image ID="Image1" runat="server" Style =" position:absolute;width:100px;height:100px;left:10px;top:10px; " ImageUrl="~/Photos/facebook.jpg" />
</form>
</body>
</html>
WebForm1.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Zzz
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}