简体   繁体   中英

Body background image not showing

 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> 

I made that page as login page and made the stylesheet file in style folder. when I linked the CSS to HTML the background don't change.

Either your CSS file is not in that location, or the image is not in that location. Open the browser inspector, eg in Google Chrome, press [F12]. This should show you the error message that either the CSS file or the image was not found.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM