Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
464 views
in Technique[技术] by (71.8m points)

html - 响应式图像对齐中心引导3(Responsive image align center bootstrap 3)

I do a catalog using Bootstrap 3. When displayed on tablets, the product images look ugly because of their small size (500x500) and a width of 767 pixels in the browser.

(我使用Bootstrap 3进行目录。当在平板电脑上显示时,产品图像看起来很难看,因为它们的尺寸很小(500x500),浏览器的宽度为767像素。)

I want to put the image in the center of the screen, but for some reason I can not.

(我想把图像放在屏幕的中央,但由于某种原因,我不能。)

Who be will help solve the problem?

(谁将帮助解决问题?)

在此输入图像描述

  ask by Konstantin Rusanov translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Twitter Bootstrap 3中有.center-block类( 自v3.0.1起 ),因此使用:

<img src="..." alt="..." class="img-responsive center-block" />

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...