Grady_1234
Grady_1234
采纳率90.9%
2019-11-21 22:37

asp.net做的登陆界面如何添加背景图片?

asp.net做的登陆界面如何添加背景图片,下面是源代码,如何修改

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="_Default" %>

<!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>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        用户名:<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br />
        <br />
        密&nbsp; &nbsp;码:<asp:TextBox ID="TextBox2" runat="server" TextMode="Password"></asp:TextBox><br />
        &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
        <br />
        &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
        <asp:Button ID="Button1" runat="server" Text="登录" OnClick="Button1_Click" />
        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
        <asp:Button ID="Button2" runat="server" Text="注册" OnClick="Button2_Click" style="height: 21px" /></div>
    </form>
</body>
</html>
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答

  • weixin_44011931 小白灭霸 2年前

    css:

    body{ background-images:url('图片地址') }
    点赞 1 评论 复制链接分享