简体   繁体   English

如何获得带字幕的缩略图,其缩略图与引导程序3的中心垂直对齐

[英]How do I get thumbnails with captions to the right vertically aligned to the center on bootstrap 3

I'm making a website that uses Bootstrap 3 and I need a row with 3 columns of thumbnails with their captions to the right. 我正在制作一个使用Bootstrap 3的网站,我需要一行带有3列缩略图的行,其标题位于右侧。 Like this: 像这样:

在此处输入图片说明

So my questions are: 所以我的问题是:

  • How do I get the captions to the right? 如何获得正确的字幕?

  • How do I vertically center the text to the thumbnail? 如何将文本垂直居中放置在缩略图上?

  • If possible I'd like to have the gray wrapper you see on the image. 如果可能,我希望您在图像上看到灰色的包装纸。

If you don't plan to support IE8 or less you can use the following rule: 如果您不打算支持IE8或更低版本,则可以使用以下规则:

.vertical-center {
  position: relative;
  top: 50%;
  transform: translateY(-50%);
}

This should be applied to the child you want to vertical center inside its parent. 这应应用于要在其父对象内部垂直居中的子对象。

source 资源

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使自举徽章垂直居中对齐? - How to make bootstrap badge vertically center aligned? 如何将文字和图片垂直居中对齐 - How do I center aligned vertically the text with my image 如何垂直居中 li 导航菜单但将其水平对齐到右侧,同时保持徽标图标水平对齐左和 ctrd vert? - How do I vertically center li navigation menu but horizontally align it to the right while keeping logo icon horizontally aligned left and ctrd vert? 使用Twitter Bootstrap的缩略图未垂直对齐 - Thumbnails using twitter bootstrap not vertically aligned 如何使用引导程序垂直将列居中? - How do I responsively center columns with bootstrap vertically? 如何在引导程序中将这些按钮垂直居中于容器中间? - How do I vertically center these buttons in the middle of the container in bootstrap? 在右对齐div中垂直居中放置文本框 - Vertically center a textbox in a right-aligned div 如何将元素置于容器中心,同时保持它们垂直对齐? - How do I center element within a container while keeping them vertically aligned? 如何将我的项目符号列表移动到中心,同时让它们在 CSS 中垂直对齐? - How do I move my bullet list to the center while having them vertically aligned in CSS? 如何让文本右对齐,但 div 居中对齐? - How can I have text aligned right, but the div aligned center?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM