而不是表我管理得到一个响应表与divs和引导,但最大高度不工作 [英] instead of tables i managed to get a responsive table with divs and bootstrap but max height doesnt work

查看:88
本文介绍了而不是表我管理得到一个响应表与divs和引导,但最大高度不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

而不是使用响应表我管理得到3 colums与bootstrap显示数据,和单元格具有相同的高度,我试图使其响应,所以单元格保持在同一行。我不是确保如果我的方式使用@media是聪明的,似乎不工作,当它的大小超级狭窄。感谢

Instead of using a responsive table i managed to get 3 colums with bootstrap to display data, and with cells that got the same height, i tried to make it responsive, so the cells stay on the same line..i am not sure if my way using @media is clever and it seems not to work when its resized to super narrow. thanks

<!DOCTYPE html>
<html lang="en" class="no-js">
  <head>

    <link rel="stylesheet" href="css/bootstrap.min.css">
   <style type="text/css">
    @media (max-width: 3500px) {  
      .minh {
       min-height: 250px;
     background-color: blue;
      }
    }
    @media (max-width: 1200px) {
      .minh {
       min-height: 320px;
       background-color: red;
      }
    }
    @media (max-width: 990px) {
      .minh {
       min-height: 500px;
        background-color: blue;
      }
    }
    @@media (max-width: 400px) {
      .minh {
        min-height: auto;
         background-color: red;
      }
    }
</style>

  </head>
  <body>

  <div class="container">
    <!-- first item-->
    <div class="col-md-4 col-sm-4 text-center">
      <div class="overflow-hidden"><img src="http://placehold.it/350x150" alt=""></div>
      <div class="text-center minh">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised </div>
      <div class="text-center"><br>www.url.de</div>
    </div>
    <!-- second item-->
    <div class="col-md-4 col-sm-4 text-center">
      <div class="overflow-hidden"><img src="http://placehold.it/350x150" alt=""></div>
      <div class="text-center minh">It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).</div>
      <div class="text-center"><br>www.url.de</div>
    </div>
    <!-- third item-->
    <div class="col-md-4 col-sm-4 text-center">
      <div class="overflow-hidden"><img src="http://placehold.it/350x150" alt=""></div>
      <div class="text-center minh">he standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested.</div>
      <div class="text-center"><br>www.url.de</div>
    </div>
  </div>

</body>
</html>


推荐答案

应该使用:

<div class="col-xs-4 text-center">

代码

<div class="col-md-4 col-sm-4 text-center">

没有意义,因为当屏幕md变成sm时,列又有size = 4:

has not sense because when the screen md becomes sm, the column has size=4 again: no changes.

图片也可以回应类别缩图:

Also the images can be responsive with the class thumbnail:

<div class="thumbnail">
  <img src="http://placehold.it/350x150" alt=""></div>
<div>

我在jsfiddle中做了一个示例:
http://jsfiddle.net/linkita/bdvo05cg/

I made an example in jsfiddle: http://jsfiddle.net/linkita/bdvo05cg/

这篇关于而不是表我管理得到一个响应表与divs和引导,但最大高度不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆