<tfoot id='IQjOL'></tfoot>

  • <small id='IQjOL'></small><noframes id='IQjOL'>

    • <bdo id='IQjOL'></bdo><ul id='IQjOL'></ul>
      1. <legend id='IQjOL'><style id='IQjOL'><dir id='IQjOL'><q id='IQjOL'></q></dir></style></legend>
        <i id='IQjOL'><tr id='IQjOL'><dt id='IQjOL'><q id='IQjOL'><span id='IQjOL'><b id='IQjOL'><form id='IQjOL'><ins id='IQjOL'></ins><ul id='IQjOL'></ul><sub id='IQjOL'></sub></form><legend id='IQjOL'></legend><bdo id='IQjOL'><pre id='IQjOL'><center id='IQjOL'></center></pre></bdo></b><th id='IQjOL'></th></span></q></dt></tr></i><div id='IQjOL'><tfoot id='IQjOL'></tfoot><dl id='IQjOL'><fieldset id='IQjOL'></fieldset></dl></div>

        将DIV堆叠在一起?

        Stacking DIVs on top of each other?(将DIV堆叠在一起?)

                <tbody id='56faT'></tbody>
            1. <legend id='56faT'><style id='56faT'><dir id='56faT'><q id='56faT'></q></dir></style></legend>

              <small id='56faT'></small><noframes id='56faT'>

              <tfoot id='56faT'></tfoot>

                <i id='56faT'><tr id='56faT'><dt id='56faT'><q id='56faT'><span id='56faT'><b id='56faT'><form id='56faT'><ins id='56faT'></ins><ul id='56faT'></ul><sub id='56faT'></sub></form><legend id='56faT'></legend><bdo id='56faT'><pre id='56faT'><center id='56faT'></center></pre></bdo></b><th id='56faT'></th></span></q></dt></tr></i><div id='56faT'><tfoot id='56faT'></tfoot><dl id='56faT'><fieldset id='56faT'></fieldset></dl></div>
                  <bdo id='56faT'></bdo><ul id='56faT'></ul>
                  本文介绍了将DIV堆叠在一起?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  是否可以堆叠多个 DIV,例如:

                  <div></div><div></div><div></div><div></div></div>

                  所以所有这些内部 DIV 都具有相同的 X 和 Y 位置?默认情况下,它们都在彼此下方,将 Y 位置增加上一个 DIV 的高度.

                  我觉得某种浮动或展示或其他技巧可能会咬人?

                  父 DIV 具有相对位置,因此,使用绝对位置似乎不起作用.

                  解决方案

                  根据需要定位外部 div,然后使用绝对定位内部 div.它们都会堆积起来.

                  .inner {位置:绝对;}

                  <div class="outer"><div class="inner">1</div><div class="inner">2</div><div class="inner">3</div><div class="inner">4</div></div>

                  Is it possible to stack up multiple DIVs like:

                  <div>
                  <div></div>
                  <div></div>
                  <div></div>
                  <div></div>
                  </div>
                  

                  So that all those inner DIVs have the same X and Y position? By default they all go below each other increasing the Y position by the height of the last previous DIV.

                  I have a feeling some sort of float or display or other trick could bite?

                  EDIT: The parent DIV has position relative, so, using position absolute does not seem to work.

                  解决方案

                  Position the outer div however you want, then position the inner divs using absolute. They'll all stack up.

                  .inner {
                    position: absolute;
                  }

                  <div class="outer">
                     <div class="inner">1</div>
                     <div class="inner">2</div>
                     <div class="inner">3</div>
                     <div class="inner">4</div>
                  </div>

                  这篇关于将DIV堆叠在一起?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  quot;Each child in an array should have a unique key propquot; only on first time render of page(“数组中的每个孩子都应该有一个唯一的 key prop仅在第一次呈现页面时)
                  How do I make a TextGeometry multiline? How do I put it inside a square so it wraps like html text does inside a div?(如何制作 TextGeometry 多线?如何将它放在一个正方形内,以便它像 html 文本一样包裹在 div 内?) - IT屋-程序员软件开发技术分享社
                  Scale background image to fit ie8 window(缩放背景图像以适合 ie8 窗口)
                  @fontface in IE7 (IETEster) not working properly(IE7 (IETEster) 中的@fontface 无法正常工作)
                  Safari 5.1 breaks CSS table cell spacing(Safari 5.1 打破 CSS 表格单元格间距)
                  Put in bold part of description in metatag Drupal module(将描述的粗体部分放在元标记 Drupal 模块中)

                  <i id='6qNFM'><tr id='6qNFM'><dt id='6qNFM'><q id='6qNFM'><span id='6qNFM'><b id='6qNFM'><form id='6qNFM'><ins id='6qNFM'></ins><ul id='6qNFM'></ul><sub id='6qNFM'></sub></form><legend id='6qNFM'></legend><bdo id='6qNFM'><pre id='6qNFM'><center id='6qNFM'></center></pre></bdo></b><th id='6qNFM'></th></span></q></dt></tr></i><div id='6qNFM'><tfoot id='6qNFM'></tfoot><dl id='6qNFM'><fieldset id='6qNFM'></fieldset></dl></div>
                    <bdo id='6qNFM'></bdo><ul id='6qNFM'></ul>
                      <tbody id='6qNFM'></tbody>
                  • <legend id='6qNFM'><style id='6qNFM'><dir id='6qNFM'><q id='6qNFM'></q></dir></style></legend>

                    1. <tfoot id='6qNFM'></tfoot>
                        1. <small id='6qNFM'></small><noframes id='6qNFM'>