Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
474 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 Reply

0 votes
by (71.8m points)

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

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...