gpt4 book ai didi

html - 背景重复不起作用

转载 作者:行者123 更新时间:2023-11-28 14:20:08 24 4
gpt4 key购买 nike

我制作了一个简单的 html 页面,上面有一个图像显示为标题。问题是图像没有重复。

当我将 width 设置为 100% 时,td (side) 消失了。如果我从 basestrip 中删除 width,那么它只会覆盖一半的屏幕区域。我想用指定高度的图像覆盖整个屏幕。

<table cellpadding="0" cellspacing="0">
<tr>
<td id="side" width="10px" height="25px"></td>
<td></td>
<td id="basestrip" width="100%" height="25px">
</td>
</tr>
</table>

这是CSS:

#side {
background-color: #014160;
}

#basestrip {
background-image: url('../Images/topstripbg.png');
background-repeat: repeat-x;
}

最佳答案

尝试在您的表格中添加一个 width="100%"(或更好的 style="width: 100%"或应用 width: 100% 的 CSS 样式更好)。使用您的代码,单元格占据表格的 100%。但表格默认采用所有单元格内容的大小。

关于html - 背景重复不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8585737/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com