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