Html 你是如何了解你的文字背景的?
我在文本背景中放置背景图像时遇到问题。我使用的代码我有,但它总是把图像放在我的文本前面。代码如下:Html 你是如何了解你的文字背景的?,html,css,background,html-table,background-image,Html,Css,Background,Html Table,Background Image,我在文本背景中放置背景图像时遇到问题。我使用的代码我有,但它总是把图像放在我的文本前面。代码如下: <html> </style> <head> <title>Testing</title> </head> <h1 style="text-align: center;"> <img alt="" src="header.png" /> </h1>
<html>
</style>
<head>
<title>Testing</title>
</head>
<h1 style="text-align: center;">
<img alt="" src="header.png" />
</h1>
<p> </p>
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
<tbody>
<tr>
<td style="width: 50%">
<h2>
<span style="color: #ffd700;"><span
style="background-color: #0000ff;">Unknown</span>
</h2>
</td>
<td> </td>
<td style="width: 50%">
<h2>
<span style="color: #ffd700;"><span
style="background-color: #0000ff;">Unknown</span>
</h2>
</td>
</tr>
<tr>
<td>
<h4>
<strong>(A bunch of text I had)</strong>
</h4>
<h4>
<strong>(More Text)</strong>
</h4>
<h4>
<strong>(Text)</strong>
</h4>
</td>
<td> </td>
<td>
<p>
<img alt="" src="image.png" />
</p>
<p style="margin: 0in; margin-bottom: .0001pt">
<strong>Person</strong>
<o:p></o:p>
</p>
<p style="margin: 0in 0in 0.0001pt;">
<strong>(More text)</strong>
<o:p></o:p>
</p>
<p style="margin: 0in 0in 0.0001pt;">
<strong>(More text)</strong>
<o:p></o:p>
</p>
<p style="margin: 0in 0in 0.0001pt;">
<strong>(More text)</strong>
<o:p></o:p>
</span>
</p>
<p style="margin: 0in; margin-bottom: .0001pt">
<strong><a href="www.google.com"(Moretext)></a></strong></a>
<o:p></o:p>
</p>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</div>
</html>
测试
不为人知
不为人知
(我有一堆文本)
(更多文本)
(文本)
人
(更多文本)
(更多文本)
(更多文本)
忘记添加我的背景图像代码:
<div style="z-index:0;left:0;top:0;width:100%;height:100%">
<img src="background.png" style='width:100%;height:100%'/>
不要使用
代码-这是不必要的
我建议你避免使用
z-index
,除非你真的需要,因为如果这是唯一可以避免使用定位或浮动的方法。没有看到任何代码会使图像成为背景注释,只有一个
,它是您页面上的最后一个标记。如果您所要做的就是在我们真正知道我们正试图扩展到您时投票否决他人,那么您将无法在将来获得帮助。
<div style="background: url(background.png);">