Twitter bootstrap 3 如何在引导网格的列之间指定间距

Twitter bootstrap 3 如何在引导网格的列之间指定间距,twitter-bootstrap-3,Twitter Bootstrap 3,我正在使用代码笔网站进行快速预览,并使用它的引导版本3 莫汉达斯·卡拉姆坎德·甘地 圣雄甘地 圣雄甘地是印度独立运动的主要领导人,也是一种影响世界的非暴力公民不服从形式的设计师。 使用bootstrap的网格系统 圣雄甘地是谁? 圣雄甘地(1869年10月2日至1948年1月30日)是印度反对英国统治的非暴力独立运动的领袖,在南非倡导印度人的民权。甘地出生于印度的波尔班达尔,学习法律,并以和平的公民不服从形式组织抵制英国机构。1948年,他被一名狂热分子杀害 希望此处之间有间距 &l

我正在使用代码笔网站进行快速预览,并使用它的引导版本3


莫汉达斯·卡拉姆坎德·甘地
圣雄甘地
圣雄甘地是印度独立运动的主要领导人,也是一种影响世界的非暴力公民不服从形式的设计师。

使用bootstrap的网格系统


圣雄甘地是谁?

圣雄甘地(1869年10月2日至1948年1月30日)是印度反对英国统治的非暴力独立运动的领袖,在南非倡导印度人的民权。甘地出生于印度的波尔班达尔,学习法律,并以和平的公民不服从形式组织抵制英国机构。1948年,他被一名狂热分子杀害

希望此处之间有间距

<div class="card col-md-4">
        <div class="card-body">
          <h4 class="card-title">Religion and Beliefs</h4>
          <p class="card-text">Gandhi grew up worshiping the Hindu god Vishnu and following Jainism, a morally rigorous ancient Indian religion that espoused non-violence, fasting, meditation and vegetarianism.

During Gandhi’s first stay in London, from 1888 to 1891, he became more committed to a meatless diet, joining the executive committee of the London Vegetarian Society, and started to read a variety of sacred texts to learn more about world religions.

Living in South Africa, Gandhi continued to study world religions. “The religious spirit within me became a living force,” he wrote of his time there. He immersed himself in sacred Hindu spiritual texts and adopted a life of simplicity, austerity, fasting and celibacy that was free of material goods.</p>
        </div>
      </div>
<div class="card col-md-4">
        <div class="card-body">
        <h4 class="card-title">Gandhi’s Ashram & the Indian Caste System</h4>
        <p class="card-text">
          In 1915 Gandhi founded an ashram in Ahmedabad, India, that was open to all castes. Wearing a simple loincloth and shawl, Gandhi lived an austere life devoted to prayer, fasting and meditation. He became known as “Mahatma,” which means “great soul.”

In 1932, Gandhi, at the time imprisoned in India, embarked on a six-day fast to protest the British decision to segregate the “untouchables,” those on the lowest rung of India’s caste system, by allotting them separate electorates. The public outcry forced the British to amend the proposal.
        </p>
        </div>
      </div>
    </div>
  </div>
</div>

宗教和信仰

甘地从小崇拜印度教毗湿奴神,追随耆那教,这是一种道德严谨的古印度宗教,信奉非暴力、禁食、冥想和素食主义。 1888年至1891年甘地第一次在伦敦逗留期间,他更加致力于无肉饮食,加入了伦敦素食协会的执行委员会,并开始阅读各种宗教经文,以了解更多有关世界宗教的信息。 生活在南非的甘地继续研究世界宗教。“我内心的宗教精神变成了一股生气勃勃的力量,”他写到自己在那里的时光。他沉浸在神圣的印度教精神文本中,过着简朴、朴素、禁食和独身的生活,没有任何物质财富

希望此处之间有间距

<div class="card col-md-4">
        <div class="card-body">
          <h4 class="card-title">Religion and Beliefs</h4>
          <p class="card-text">Gandhi grew up worshiping the Hindu god Vishnu and following Jainism, a morally rigorous ancient Indian religion that espoused non-violence, fasting, meditation and vegetarianism.

During Gandhi’s first stay in London, from 1888 to 1891, he became more committed to a meatless diet, joining the executive committee of the London Vegetarian Society, and started to read a variety of sacred texts to learn more about world religions.

Living in South Africa, Gandhi continued to study world religions. “The religious spirit within me became a living force,” he wrote of his time there. He immersed himself in sacred Hindu spiritual texts and adopted a life of simplicity, austerity, fasting and celibacy that was free of material goods.</p>
        </div>
      </div>
<div class="card col-md-4">
        <div class="card-body">
        <h4 class="card-title">Gandhi’s Ashram & the Indian Caste System</h4>
        <p class="card-text">
          In 1915 Gandhi founded an ashram in Ahmedabad, India, that was open to all castes. Wearing a simple loincloth and shawl, Gandhi lived an austere life devoted to prayer, fasting and meditation. He became known as “Mahatma,” which means “great soul.”

In 1932, Gandhi, at the time imprisoned in India, embarked on a six-day fast to protest the British decision to segregate the “untouchables,” those on the lowest rung of India’s caste system, by allotting them separate electorates. The public outcry forced the British to amend the proposal.
        </p>
        </div>
      </div>
    </div>
  </div>
</div>

甘地的道场与印度种姓制度

1915年,甘地在印度艾哈迈达巴德建立了一个道场,向所有种姓开放。甘地身穿简单的腰带和披肩,过着虔诚的祈祷、禁食和冥想生活。他被称为“圣雄教”,意思是“伟大的灵魂” 1932年,甘地在印度被监禁时,开始了为期六天的禁食,以抗议英国将印度种姓制度最底层的“贱民”(untochables)进行隔离的决定,将他们分为不同的选民。公众的强烈抗议迫使英国人修改了该提案。


一个可能需要使用边距和填充的快速解决方案是尝试在中间元素上添加边框。要做到这一点,您必须:

  • 创建一个
    CSS
    类,如:

    .sideborder{
    左边框:2倍纯黑;
    右边框:2倍纯黑;
    }

然后您只需将这个类添加到mid div中


虽然,我必须再次提到,这可能不是最好的解决方案,因为它需要大量的css修改。另外,对于您想要的空间,您可以将边框边涂成透明的颜色,或者只需在中间分区中添加
左填充
&
右填充

一个可能需要使用边距和填充的快速解决方案是尝试在中间元素上添加边框。要做到这一点,您必须:

  • 创建一个
    CSS
    类,如:

    .sideborder{
    左边框:2倍纯黑;
    右边框:2倍纯黑;
    }

然后您只需将这个类添加到mid div中


虽然,我必须再次提到,这可能不是最好的解决方案,因为它需要大量的css修改。另外,对于所需的空间,您可以将边框边涂成透明的颜色,或者只需将
左填充
右填充
添加到中间分区。

Bootstrap 4具有指定的间距控制类

您可以使用这样的ml-2将
左边距设置为
0.5rem
。号码可以是:

  • 0:左边距:0
  • 1:左边距:0.25雷姆
  • 2:左边距:0.5雷姆
  • 3:左边距:1rem
  • 4:左边距:1.5雷姆
  • 5:左侧边缘:3rem
还有其他间距控件,例如

  • 页边距顶部的mt
  • 用于填充顶部的pt

引导程序4具有指定的间距控制类

您可以使用这样的ml-2将
左边距设置为
0.5rem
。号码可以是:

  • 0:左边距:0
  • 1:左边距:0.25雷姆
  • 2:左边距:0.5雷姆
  • 3:左边距:1rem
  • 4:左边距:1.5雷姆
  • 5:左侧边缘:3rem
还有其他间距控件,例如

  • 页边距顶部的mt
  • 用于填充顶部的pt

对于
,它应该是引导4。尝试在卡后添加
ml-2
(用空格分隔):
卡col-md-4
更多信息:对于
,它应该是引导4。尝试在卡后添加
ml-2
(用空格分隔):
卡col-md-4
更多信息: