This is a question asked by friends. The specific requirements are as follows:
How can I insert n multiple images in a fixed Div layer to arrange them in one row, and a slide will appear when the layer width is exceeded?
I thought that the overflow attribute could be used, but the test failed. Later, div cascade was used to achieve the effect.
HTML code:
1: <! -- How to insert n multiple images in a fixed Div layer to arrange them in one row. When the layer width is exceeded, a slide will appear? -->
2: <!DOCTYPE html>
3:
4:
5: <meta http-equiv="content-type" content="text/html;charset=utf-8">
6:
7: <body>
8: <div class="div">
9: <div class="div1"></div>
10: <div class="div2"></div>
11: <div class="div3"></div>
12: </div>
13: </body>
14:
CSS control style:
1: .div{
2: width:400px;
3: height:200px;
4: overflow-Y: hidden;/* only horizontal scroll bars appear */
5: position: absolute;
6: }
7: .div1{
8: position:absolute;
9: z-index:1;
10: }
11: .div2{
12: position:absolute;
13: z-index:5;
14: left:200px;
15: top:0px
16: }
17: .div3{
18: position:absolute;
19: z-index:10;
20: left:400px;
21: top:0px
22: }
Effect:
Source: http://www.ido321.com/666.html
Question: How to insert n multiple images in a fixed Div layer