我是Bootstrap的新手,我想在大屏幕和行媒体中对齐四个图像,我想只对齐两个图像。当我尝试使用以下代码时,它在lg中按预期工作。但在中等前两个图像的宽度相等,但第三和第四个图像没有正确对齐。enter image description here 在此先感谢。[在此输入图像说明] [2]
<div class="container">
<div class="row">
<div class="col-lg-3 col-xs-6 Imgdiv">
<img src="Images/Car.jpg" class="img-responsive Imagesize" />
<p class="Imagecontent">A. P. De Zoysa was born in Randombe, Ambalangoda in the Southern province of Ceylon (now Sri Lanka). His parents died in an epidemic when he was eleven, and thereafter he was brought up by his grandmother. He started his education in the nearby historic temple, the Maha Samudraramaya, and then attended the Wesleyan school in Randombe. He continued his secondary education at Mahinda College, Galle, where he came under the influence of its principal, the famous Theosophist and Pali scholar Frank Lee Woodward.[1] Later he moved to Wesley College in Colombo.</p>
</div>
<div class="col-lg-3 col-xs-6 Imgdiv ">
<img src="Images/Rose.jpg" class="img-responsive Imagesize" />
<p class="Imagecontent">Then he taught for a few years at Ananda College, Colombo and at Royal College Colombo. In 1921 he went to England and continued his higher education. In London he supported himself by coaching overseas students, and his wide social circle included the artist William Roberts, who painted his portrait. After taking an external London degree, in 1927 he was called to the Bar at Gray's Inn, and in 1929 he obtained a PhD in anthropology at London University for a dissertation on 'Observances and Customs in Sinhalese Villages'.[2]</p>
</div>
<div class="col-lg-3 col-xs-6 Imgdiv">
<img src="Images/Bike.jpg" class="img-responsive Imagesize" />
<p class="Imagecontent">With his wife, née Eleanor Hutton, whom he had met at the Buddhist mission in London and married in 1929, in 1934 de Zoysa returned to Sri Lanka, and began work as a lawyer. He was elected to represent Colombo South in 1936, and he continued to serve in the State Council (as an independent) until 1947. Causes which he supported included opposition to the death penalty, anti-dowry legislation, and improved state education. For many years he was also a municipal councillor in Colombo, taking up local issues and campaigning to improve the city's amenities.</p>
</div>
<div class="col-lg-3 col-xs-6 Imgdiv">
<img src="Images/Strawberry.jpg" class="img-responsive Imagesize" />
<p class="Imagecontent">In 1939 de Zoysa bought a printing press, and began to produce a series of educational books in Sinhala; he also edited a weekly paper, the Dharmasamaya. But his greatest project, which took over twenty years, with help from Buddhist scholars, was to publish a translation of the whole Tripitaka canon of Buddhist scripture into simple Sinhala; this eventually ran to forty-eight volumes. A concise edition, in about ten volumes, was incomplete at his death. He also compiled and printed English–Sinhala and Sinhala-English dictionaries</p>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-lg-3 col-xs-6 Imgdiv">
<img src="Images/Car.jpg" class="img-responsive Imagesize" />
<p class="Imagecontent">A. P. De Zoysa was born in Randombe, Ambalangoda in the Southern province of Ceylon (now Sri Lanka). His parents died in an epidemic when he was eleven, and thereafter he was brought up by his grandmother. He started his education in the nearby historic temple, the Maha Samudraramaya, and then attended the Wesleyan school in Randombe. He continued his secondary education at Mahinda College, Galle, where he came under the influence of its principal, the famous Theosophist and Pali scholar Frank Lee Woodward.[1] Later he moved to Wesley College in Colombo.</p>
</div>
<div class="col-lg-3 col-xs-6 Imgdiv ">
<img src="Images/Rose.jpg" class="img-responsive Imagesize" />
<p class="Imagecontent">Then he taught for a few years at Ananda College, Colombo and at Royal College Colombo. In 1921 he went to England and continued his higher education. In London he supported himself by coaching overseas students, and his wide social circle included the artist William Roberts, who painted his portrait. After taking an external London degree, in 1927 he was called to the Bar at Gray's Inn, and in 1929 he obtained a PhD in anthropology at London University for a dissertation on 'Observances and Customs in Sinhalese Villages'.[2]</p>
</div>
<div class="col-lg-3 col-xs-6 Imgdiv">
<img src="Images/Bike.jpg" class="img-responsive Imagesize" />
<p class="Imagecontent">With his wife, née Eleanor Hutton, whom he had met at the Buddhist mission in London and married in 1929, in 1934 de Zoysa returned to Sri Lanka, and began work as a lawyer. He was elected to represent Colombo South in 1936, and he continued to serve in the State Council (as an independent) until 1947. Causes which he supported included opposition to the death penalty, anti-dowry legislation, and improved state education. For many years he was also a municipal councillor in Colombo, taking up local issues and campaigning to improve the city's amenities.</p>
</div>
<div class="col-lg-3 col-xs-6 Imgdiv">
<img src="Images/Strawberry.jpg" class="img-responsive Imagesize" />
<p class="Imagecontent">In 1939 de Zoysa bought a printing press, and began to produce a series of educational books in Sinhala; he also edited a weekly paper, the Dharmasamaya. But his greatest project, which took over twenty years, with help from Buddhist scholars, was to publish a translation of the whole Tripitaka canon of Buddhist scripture into simple Sinhala; this eventually ran to forty-eight volumes. A concise edition, in about ten volumes, was incomplete at his death. He also compiled and printed English–Sinhala and Sinhala-English dictionaries</p>
</div>
</div>
</div>
答案 0 :(得分:0)
没问题。学习Bootstrap很简单。 使用
col-xl-* for large screens.
col-md-* for medium screens.
col-sm-* for small screens.
col-xs-* for extra small screens.
我认为使用col-md-6可以解决您的问题。请试试。