html - 相对位置向左移动导致内容保持在右侧

标签 html css

我试图通过使用负偏移量来消除将左浮动的 div 向左移动时造成的间隙。

有问题的网站:

http://www.imvu-e.com/services/hov/index_wip.php?avatar22=191;741328;2145830;3414888;4683846;5542063;6041125;6698072;8508954;11856954;13682868;14965631;20383310;21560759;22275311;22351471;22697202;25083685;30621584;30678733;31548266

图片类

.pic {
    float: left;
    width: 175px;
    height: 750px;
    margin-right: 22px;
    position: relative;
    left: -191px;
}

这就是我将图片向左移动的方式,我希望右侧的内容(衣服、头像和皮肤以及头部和脸部)左对齐;类似于配件的定位方式。

我想避免使用相同的过程将它们移到左侧。

最佳答案

您好,现在定义您的 id #avatar_products position: relative; 和您的类(class) .pic position:absolute;左:-192px;

像这样

#avatar_products{position: relative;}
.pic{    position: absolute;left: -192px;}

结果是这样的

enter image description here

关于html - 相对位置向左移动导致内容保持在右侧,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33936070/

相关文章:

javascript - iDangero.us Swiper 在 div 内设置隐藏显示时不起作用 :none

javascript - 抓取 :after content

html - 如何使用 flex 将 div 拉伸(stretch)到全高

javascript - 来自 javascript 的 Bootstrap 式警报

CSS径向渐变不从中心应用

javascript - 悬停时的 Animate.css

javascript - jQuery 如何更改第二个元素上的文本?

html - HTML 表格行中的交替颜色不起作用

javascript - 覆盖 html 表格样式 table-layout-fixed

CSS3过渡变换像素化