gpt4 book ai didi

css - 当我有背景图像时如何缩进所有行文本?

转载 作者:太空宇宙 更新时间:2023-11-04 13:57:54 25 4
gpt4 key购买 nike

这看起来很简单,但我似乎无法按照我的意愿让它工作:

我的 CSS:

.widget_box_fill {
display: block;
float: left;
clear: left;
width: 620px;
margin:0px 0px 0px 30px;
padding: 20px 0;
background: url(../images/tabbed_bg.jpg) no-repeat;
background-size:100% 100%;
}

尽我所能,我似乎无法将图像留在原地并缩进所有文本行。

最佳答案

您正在使用 padding: 20px 0; 这意味着您的左右边距为 0。

尝试使用 padding:20px; 将它放在所有边上。

如果你只想在一侧使用它,请尝试 padding-left:20px;

关于css - 当我有背景图像时如何缩进所有行文本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21711987/

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