HTML
<div class="row clearfix">
<div class="col-md-9 column">
<div class="row clearfix">
<div class="a">
<p>One reason people lie is to achieve personal power. Achieving personal power is helpful for someone who pretends to be more confident than
he really is. For example, one of my friends threw a party at his house last month. He asked me to come to his party and bring a date.
However, I didn’t have a girlfriend. One of my other friends, who had a date to go to the party with, asked me about my date.
I didn’t want to be embarrassed, so I claimed that I had a lot of work to do. I said I could easily find a date even better than his if I wanted
to. I also told him that his date was ugly. I achieved power to help me feel confident; however, I embarrassed my friend and his date. Although
this lie helped me at the time, since then it has made me look down on myself</p>
</div>
<div class="a">
<p>One reason people lie is to achieve personal power. Achieving personal power is helpful for someone who pretends to be more confident than
he really is. For example, one of my friends threw a party at his house last month. He asked me to come to his party and bring a date.
However, I didn’t have a girlfriend. One of my other friends, who had a date to go to the party with, asked me about my date.
I didn’t want to be embarrassed, so I claimed that I had a lot of work to do. I said I could easily find a date even better than his if I wanted
to. I also told him that his date was ugly. I achieved power to help me feel confident; however, I embarrassed my friend and his date. Although
this lie helped me at the time, since then it has made me look down on myself</p>
</div>
</div>
</div>
<div id="b" class="col-md-3 column">
<p>One reason people lie is to achieve personal power. Achieving personal power is helpful for someone who pretends to be more confident than
he really is. For example, one of my friends threw a party at his house last month. He asked me to come to his party and bring a date.
However, I didn’t have a girlfriend. One of my other friends, who had a date to go to the party with, asked me about my date.
I didn’t want to be embarrassed, so I claimed that I had a lot of work to do. I said I could easily find a date even better than his if I wanted
to. I also told him that his date was ugly. I achieved power to help me feel confident; however, I embarrassed my friend and his date. Although
this lie helped me at the time, since then it has made me look down on myself</p>
</div>
</div>
</div>
CSS
.a{
padding:10px;
background-color:pink;
margin-bottom:10px;
box-shadow: 1px 1px 3px #B2B2B2;
}
#b{
padding:20px;
background-color:yellow;
box-shadow: 1px 1px 3px #B2B2B2;
}
当我使用填充时,间隙隐藏在a类之间以及如何在a和b之间留出空格,以便它们之间的空白区域
答案 0 :(得分:1)
你需要一个“包装器”来绕过你的'a'类:
<div class="aWrapper">
<div class="a">
<p>One reason people lie is to achieve personal power. Achieving personal power is helpful for someone who pretends to be more confident than
he really is. For example, one of my friends threw a party at his house last month. He asked me to come to his party and bring a date.
However, I didn’t have a girlfriend. One of my other friends, who had a date to go to the party with, asked me about my date.
I didn’t want to be embarrassed, so I claimed that I had a lot of work to do. I said I could easily find a date even better than his if I wanted
to. I also told him that his date was ugly. I achieved power to help me feel confident; however, I embarrassed my friend and his date. Although
this lie helped me at the time, since then it has made me look down on myself
</p>
</div>
<div class="a">
<p>One reason people lie is to achieve personal power. Achieving personal power is helpful for someone who pretends to be more confident than
he really is. For example, one of my friends threw a party at his house last month. He asked me to come to his party and bring a date.
However, I didn’t have a girlfriend. One of my other friends, who had a date to go to the party with, asked me about my date.
I didn’t want to be embarrassed, so I claimed that I had a lot of work to do. I said I could easily find a date even better than his if I wanted
to. I also told him that his date was ugly. I achieved power to help me feel confident; however, I embarrassed my friend and his date. Although
this lie helped me at the time, since then it has made me look down on myself
</p>
</div>
</div>
这是一个工作示例: http://www.bootply.com/8TwSbK8Awn
答案 1 :(得分:0)
div class =&#34; row clearfix&#34;包裹&#34; a&#34;需要宽度,如100%;我用过它,现在显示了差距。
答案 2 :(得分:0)
在两种情况下都添加.col-md-12
<div class="a col-md-12">