そのため、すべてが左にフロートし、その間に等量のマージンがある div 3 の行がありますが、3 番目または右側になると、マージンを入れすぎると、自然に次の行に移動します。ラッパー内にスラッシュを配置して、それぞれの間に等量のスペースがあるようにしたい...
#mainwrapper .box {
width: 288px;
height: 245px;
border:0px solid #fff;
margin-left: 0px;
margin-right: 20px;
margin-bottom: 20px;
-moz-box-shadow: 0 0 5px #d9d9d9;
-webkit-box-shadow: 0 0 5px #d9d9d9;
box-shadow: 0 0 5px #d9d9d9;
float: left;
position: relative;
overflow: hidden;
cursor:pointer;
border: 10px solid #fff;
}
#mainwrapper .box img {
position: absolute;
left: 0;
-webkit-transition: all 500ms ease-out;
-moz-transition: all 500ms ease-out;
-o-transition: all 500ms ease-out;
-ms-transition: all 500ms ease-out;
transition: all 500ms ease-out;
}
したがって、画像と画像のラッパーがあります-それが置かれているラッパーは次のとおりです。
#wrapper {
width: 100%;
max-width: 980px;
margin: auto;
margin-top: 0;
margin-bottom: 60px;
}
何か案は?また、ユーザーがリストに画像をアップロードすると、これらの 3 つの画像だけに適用することはできません。