开发者

Keeping HTML div in one place

I want to keep several divs at one place and want to show them on clicking on the respective buttons but they are coming in a row format. Actually I want开发者_如何学Go to keep then overlapping each another.


You have to use absolute positioning and z-index to put one on top of the other.

Check this example, and modify z-index to see how it changes: http://jsfiddle.net/Pizzicato/LgN9z/


You can do it with absolute CSS positioning. Here is tutorial on this topic with examples. Overlapping of HTML elements is done through z-index CSS property.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜