0

我的页面与我希望它看起来完全一样。现在看着它,我希望我会添加背景图像。有没有一种简单的方法来解决这个问题。我知道代码可能看起来有点滑稽,但这就是 Spiceworks 更正代码的方式。

<div style="text-align: center;">
<p style="font-size: 30px;">&nbsp;</p>

<p style="font-size: 30px;"><span style="color:rgb(0, 128, 0)"><strong>WELCOME TO PARK CITY CREDIT UNION&rsquo;s I.T. TICKET SYSTEM!</strong></span></p>
</div>

<div style="text-align: center;">
<p><span style="color:rgb(0, 0, 0)"><strong>Please do not email or chat, if you do so, you will be directed to open a ticket!</strong></span></p>
</div>

<div style="text-align: center;">
<p><strong>NEED IMMEDIATE ASSISTANCE and unable to reach I.T.??</strong> <strong>Call Locknet 1-877-408-1656&nbsp;&nbsp;</strong></p>

<p><em>Note - Any tickets submitted after 4:00 PM may not get a response until the next business day</em>.</p>

<p>&nbsp;</p>
</div>

<p style="font-size: 17px;"><strong>&nbsp;The Ticket System is a new platform to better serve you as well as enable a more efficient way to support your IT needs in an appropriate prioritized order.</strong></p>

<p>&nbsp;</p>

<p style="font-size: 15px;"><strong><span style="text-decoration:underline">NEED HELP? We are here for you!</span></strong></p>

<p style="font-size: 14px;">Click on the <em>&ldquo;New Ticket&rdquo;</em>&nbsp; Tab and create your ticket. If your ticket has not been started/resolved within 3 hours, please contact IT.</p>

<hr />
<p style="font-size: 15px;"><span style="text-decoration:underline"><strong><em>How do I know my ticket came through?</em></strong></span></p>

<p style="font-size: 14px;">- You will receive an email from <em>spiceworks@parkcitycu.org</em></p>

<p style="font-size: 14px;">-You will receive a second email letting you know who is working on your ticket</p>

<p style="font-size: 14px;">- You may recieve a phone call if your ticket requires follow up</p>

<hr />

4

3 回答 3

0

我编辑了您的代码(并更正了拼写错误)。非常简单的修复:

<body style="background-image: url(http://lorempixel.com/1024/1024/); background-repeat: no-repeat; background-size: cover;">

<div style="text-align: center;">
<p style="font-size: 30px;">&nbsp;</p>

<p style="font-size: 30px;"><span style="color:rgb(0, 128, 0)"><strong>WELCOME TO PARK CITY CREDIT UNION&rsquo;s I.T. TICKET SYSTEM!</strong></span></p>
</div>

<div style="text-align: center;">
<p><span style="color:rgb(0, 0, 0)"><strong>Please do not email or chat, if you do so, you will be directed to open a ticket!</strong></span></p>
</div>

<div style="text-align: center;">
<p><strong>NEED IMMEDIATE ASSISTANCE and unable to reach I.T.??</strong> <strong>Call Locknet 1-877-408-1656&nbsp;&nbsp;</strong></p>

<p><em>Note - Any tickets submitted after 4:00 PM may not get a response until the next business day</em>.</p>

<p>&nbsp;</p>
</div>

<p style="font-size: 17px;"><strong>&nbsp;The Ticket System is a new platform to better serve you as well as enable a more efficient way to support your IT needs in an appropriate prioritized order.</strong></p>

<p>&nbsp;</p>

<p style="font-size: 15px;"><strong><span style="text-decoration:underline">NEED HELP? We are here for you!</span></strong></p>

<p style="font-size: 14px;">Click on the <em>&ldquo;New Ticket&rdquo;</em>&nbsp; Tab and create your ticket. If your ticket has not been started/resolved within 3 hours, please contact IT.</p>

<hr />
<p style="font-size: 15px;"><span style="text-decoration:underline"><strong><em>How do I know my ticket came through?</em></strong></span></p>

<p style="font-size: 14px;">- You will receive an email from <em>spiceworks@parkcitycu.org</em></p>

<p style="font-size: 14px;">-You will receive a second email letting you know who is working on your ticket</p>

<p style="font-size: 14px;">- You may receive a phone call if your ticket requires follow up</p>

</body>

显然,您需要更改图像,但是此代码为您提供了背景图像。另外,我建议您以不同的方式格式化代码,因为它当前的格式化方式有点难以阅读。如果您要为 Web 进行编程(HTML、CSS、Javascript 等),我建议您使用 Brackets IDE。它不是用于格式化,但我喜欢它。

无论如何,GLHF!

于 2019-07-16T18:53:26.430 回答
0

您希望在整个页面上添加背景图片吗?如果是,您应该使用 CSS 设置背景图像:

<style>
    body {
        background-image: url("IMAGE-PATH-HERE");
    }
</style>

IMAGE-PATH-HERE 应该指向您的图像文件。例如,您可以将图像复制到 HTML 文件所在的同一文件夹中,并指定图像名称和扩展名 - 例如

<style>
    body{
        background-image:url("myimage.jpg");
    } 
</style>

如果图像位于单独的文件夹/目录中,则还要指定目录路径 - 例如

<style>
    body{
        background-image:url("assets/myimage.jpg");
    } 
</style>

希望这可以帮助

于 2019-07-16T18:39:55.063 回答
0

您应该使用 CSS 设置背景图像。

<style>
    body {
        background-image: url("BACKGROUND_IMAGE_URL_HERE");
    }
</style>
于 2019-07-16T18:10:56.040 回答