gpt4 book ai didi

css - 如何 - 右侧边框的 CSS 背景

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

在下面的示例中,我在将图像设置为#left 的右边框时遇到了问题。目前出现了边框,但它在右侧约 200 像素,而不是右侧 500 像素。

知道出了什么问题吗?

谢谢!

<html>
<STYLE type="text/css">

#wrapper, #left, #right, .sub_box
{ border: 1px solid black; }

.sub_box
{ float:left; }

#left
{ background: url("dots.gif") right repeat-y; }
</STYLE>

<div id="wrapper" style="width:882px">

<div id="left" style="width:500px;float:left">
<div class="sub_box" style="width:200px">
<p>sub box</p>
</div>
<div class="sub_box" style="width:200px">
<p>sub box</p>
</div>
<div class="sub_box" style="width:200px">
<p>sub box</p>
</div>
</div>

<div id="right" style="width:200px;float:right">
<p>Right column here</p>
</div>

</div>
</html>

最佳答案

试试这个……

background: url("dots.gif") 500px 0px repeat-y;

或根据需要进行调整。

关于css - 如何 - 右侧边框的 CSS 背景,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10332369/

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