1
是否有可能定义位置(中心),在这种情况下,图像div,在div溢出?定义位置内容Div溢出滚动
#scroll-h-v {
width: 300px;
height: 300px;
position: relative;
overflow: auto;
}
.image {
text-align: center;
margin-left: auto;
margin-right: auto;
position: relative;
}
图像应在中央这样的负荷:
是的,正确的方法。但是有可能看到整个图像吗? – l00per
你想缩放这样的图像吗?http://jsfiddle.net/KAy22/3/ tp占用容器的宽度 –
其实像这样:http://jsfiddle.net/KAy22/1/。但我想展示部分,但想滚动整个图像。因此,图像应设置为顶部:-300像素,左侧:-300像素,但不切割图像。 – l00per