为什么之后的没有效果

为什么之后的没有效果

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title></title>
    <style>
        *{
            padding:0;
            margin:0;
        }
        .word1>.test p,.word1>.test div,.word2>.test p,.word2>.test div{
            margin:0;
            padding:5px 10px;
            background:#eee;
            font-size:12px;
        }
        h1{
            margin:10px 0;
            font-size:12px;
        }
        .word1>.test,.word2>.test{
            width:600px;
            border:10px solid #000;
            -moz-column-count:4;
            -moz-column-gap:20px;
            -moz-column-rule:3px solid #090;
            -webkit-column-count:4;
            -webkit-column-gap:20px;
            -webkit-column-rule:3px solid #090;
            column-count:4;
            column-gap:20px;
            column-rule:3px solid #090;
        }
        .word1>.test div{
            -webkit-column-break-before:always;
               -moz-column-break-before:always;
             column-break-before:always;
        }
        .word2>.test div{
             -webkit-column-break-after:always;
                -moz-column-break-after:always;
                     column-break-after:always;
        }
    </style>
</head>
<body>
    <div class="word1">
        <h1>column-break-before:always</h1>
        <div class="test">
            <p>This module describes multi-column layout in CSS. By using functionality described in this document, style sheets can declare that the content of an element is to be laid out in multiple columns.</p>
            <div>不管上一列有没有填满,我都另起一列</div>
            <p>This module describes multi-column layout in CSS. By using functionality described in this document, style sheets can declare that the content of an element is to be laid out in multiple columns.</p>
        </div>
    </div>
    <div class="word2">
        <h1>column-break-after:always</h1>
        <div class="test">
            <p>This module describes multi-column layout in CSS. By using functionality described in this document, style sheets can declare that the content of an element is to be laid out in multiple columns.</p>
            <div>不管上一列有没有填满,我都另起一列</div>
            <p>This module describes multi-column layout in CSS. By using functionality described in this document, style sheets can declare that the content of an element is to be laid out in multiple columns.</p>
        </div>
    </div>
</body>
</html>


正在回答 回答被采纳积分+1

登陆购买课程后可参与讨论,去登陆

2回答
妮可妮可妮_ 2018-08-29 17:06:52

http://img1.sycdn.imooc.com//climg/5b8661eb00017c5b06420346.jpg

因为column-break-after:always总是在元素之后断行,然后产生新列,同学在div前面在适当的添加一些内容就会发现不同的地方了哦~

妮可妮可妮_ 2018-08-29 16:33:41

http://img1.sycdn.imooc.com//climg/5b8659f8000116bc07280450.jpg

column-break-before:always总是在元素之前断行并产生新列

column-break-after:always总是在元素之后断行并产生新列

请同学尽量清晰完善地描述,遇到了什么问题,以便大家给予专业的回复

  • 提问者 Aries典 #1
    为什么column-break-after:always没有像column-break-before:always一样断行?
    2018-08-29 16:35:15
问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
响应式开发与常用框架 2018
  • 参与学习           人
  • 提交作业       2198    份
  • 解答问题       5012    个

如果你有web端基础,既想进阶,又想进军移动端开发,那就来吧,我们专题为你带来的课程有HTML5、CSS3、移动基础、响应式、bootstrap、less等,让你在前端道路上畅通无阻!

了解课程
请稍等 ...
意见反馈 帮助中心 APP下载
官方微信

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师