身体背景图像没有显示

时间:2017-01-26 09:46:35

标签: html css

body {
    background-image:url(../images/bg.jpg);
}
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="test.WebForm1" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <link href="style/StyleSheet.css" rel="stylesheet" />
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>

        </div>
    </form>
</body>
</html>

我将该页面设为登录页面,并将样式表文件设置为样式文件夹。当我将CSS链接到HTML时,背景不会改变。

1 个答案:

答案 0 :(得分:0)

您的CSS文件不在该位置,或者图像不在该位置。打开浏览器检查器,例如在Google Chrome中,按[F12]。这应该显示CSS文件或图像未找到的错误消息。