页面上有很多空格

时间:2016-02-02 12:43:56

标签: css

所以我喜欢这样: http://imgur.com/a/IfHym 我做的位置 position:absolute 这就是我得到的 试图改变,但比所有图像崩溃 在HTML中我确实喜欢这个:

<div class="gallery">
    <article class = 'container1'>
        <figure class = 'cool'>
            <a href="http://www.eminem.com/" class="phorosRef">
                <img src="Photos/ Infinite_(1996),_by_Eminem.png"alt="" width="300px" height="300px" class="photos"></a>
        </figure>
        <figure class="cool">
            <a href="http://www.eminem.com/" class="phorosRef">
                <img src="Photos/Eminem_-_The_Slim_Shady_LP_CD_cover.jpg" width="300px" height="300px" alt="" class="photos"></a>
        </figure>
        <figure class="cool">
            <a href="http://www.eminem.com/" class="phorosRef">
                <img src="Photos/eminem-marshall-mathers.jpg" height="300px" width="300px" alt="" class="photos"></a>
        </figure>
        <figure class = 'cool'>
            <a href="http://www.eminem.com/" class="phorosRef">
                <img src="Photos/ Eminem_-_the_eminem_show.jpg" alt="" width="300px" height="300px" class="photos"></a>
        </figure>
        <article class = 'container2'></article>

        <figure class="cool2">
            <a href="http://www.eminem.com/" class="phorosRef">
                <img src="Photos/скачанные файлы.jpeg" width="300px" height="300px" alt="" class="photos"></a>
        </figure>
        <figure class="cool2">
            <a href="http://www.eminem.com/" class="phorosRef">
                <img src="Photos/20090506133342!Relapse_cover.jpg" width="300px" height="300px" alt="" class="photos"></a>
        </figure><br/>
        <figure class="cool2">
            <a href="http://www.eminem.com/" class="phorosRef">
                <img src="Photos/71HH7D7Z66L._SL1500_.jpg" width="300px" height="300px"  alt="" class="photos"></a>
        </figure><br/>
        <figure class = 'cool2'>
            <a href="http://www.eminem.com/" class="phorosRef">
                <img src="Photos/The_Marshall_Mathers_LP_2.png" alt="" class="photos"></a>
        </figure>
    </article>
    </div>

你可以给我一些建议吗? 我也可以显示我的CSS代码 见到你

1 个答案:

答案 0 :(得分:1)

def makeDups(young): if len(young) <= 1: return young elif young[0] != young[1]: return 2 * (young[0]) + makeDups(young[1:]) else: return makeDups(young[1:]) young = 'abcdefg' print(young) print(makeDups(young)) 元素不会与其他元素发生冲突,这意味着它们只会叠加在一起。我猜你的链接中的第二个图像是你想要实现的。在这种情况下,我建议两个部分,充满图像。

position: absolute

然后申请'position:absolute&#39;到这些部分,并给它们一个宽度。

<div class="section left">
   <img/>...
</div>
<div class="section right">
   <img/>...
</div>

这将在您的页面上创建两列,用图像填充它们并分别粘贴在左侧和右侧。