如何为 ASP.NET 网络应用程序设置背景图片?
How do I set a background image for an ASP.NET web application?
我目前有这个,但它没有按预期设置背景:
<body style: background-image url()>
我还需要它是一个文件而不是 link
我建议在您的 CSS 文件中这样做。 This page goes in depth on CSS backgrounds and shows you how to style them as well.
你可以在正文标签中做如下:
body {
background-image: url("example.jpg");
}
看起来@Sverre 打败了我建议将您的 CSS 样式移动到一个单独的文件。如果您希望将其直接留在标签中,则必须像这样重新格式化它:
<body style="background-image: url('https://yourdomain.com/some-image.png')">
我目前有这个,但它没有按预期设置背景:
<body style: background-image url()>
我还需要它是一个文件而不是 link
我建议在您的 CSS 文件中这样做。 This page goes in depth on CSS backgrounds and shows you how to style them as well.
你可以在正文标签中做如下:
body {
background-image: url("example.jpg");
}
看起来@Sverre 打败了我建议将您的 CSS 样式移动到一个单独的文件。如果您希望将其直接留在标签中,则必须像这样重新格式化它:
<body style="background-image: url('https://yourdomain.com/some-image.png')">