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時,背景不會改變。
歡迎來到Stack Overflow,請花點時間關注[Stack Overflow tour](http://stackoverflow.com/tour)並閱讀[如何提出一個好問題?](http:// stackoverflow .com/help/how-to-ask)同時向我們提供您爲您的問題編寫的相關代碼(您也可以閱讀[如何創建最小,完整和可驗證的示例](http://stackoverflow.com/help/mcve)) –