jquery - 响应式(?)网格系统

标签 jquery html css

查看this site .如您所见,它使用响应式网格系统。网格流在 1920x1080 和 1024x768 屏幕尺寸上完美运行。

我想对我的网站做同样的事情,但没有成功。我已经尝试了一些框架(responsivegridsystem.comfoundation.zurb.comgumbyframework.com),但还是没有成功。

更具体地说,我有一个“2 列”布局。左列具有固定宽度,右列包含其他几列。

按照我在 1920x1080 中的布局(完美运行): i.stack.imgur.com/sRBF6.jpg

我在 1280x1024 中的布局(不需要的空间): 1280x1024 layout

最后,我在 1024x768 中的布局(同样我有未使用的空间): 1024x768 layout

我想集中所有布局而不是“不需要的空间”——就像我之前经过的网站一样。

我的 HTML:

<div class="wrap">
<div class="left-sidebar float-left">
  <div class="shopping-list">
     <div class="inside-padding-10">
        <div class="shopping-list-header">
           <h1>0</h1>
           <p>
              Produtos na sua lista de compras
           </p>
        </div>
        <hr />
        <div class="shopping-list-body">
           <button>Calcular menores preços</button>
        </div>
     </div>
  </div>
  </div>
  <div class="main float-right">
  <ul class="products-list section group">
     <li></li>
     <li></li>
     <li></li>
     <li></li>
     <li></li>
     <li></li>
     <li></li>
     <li></li>
  </ul>
  </div>

CSS:

.wrap {
   padding-right: 195px;
   overflow: hidden;
}

.main {
   margin: 0 -220px 0 auto;
   width: 100%;
}

.main-content .left-sidebar {
   width: 200px;
}

ul.products-list {
   width: 100%;
}

ul.products-list li {
   background-color: red;
   width: 14.6em;
   height: 300px;
   margin-bottom: 5px;
   float: left;
}

有人可以帮助我吗?

最佳答案

快速使用控制台显示 $.fn.isotopeIsotopeDavid de Sandro 的 jQuery 插件允许 block 布局响应性地重新排列(针对各种刺激)。查看 DOM 检查器会发现元素上的意外结构,但它看起来在功能上仍然是可能的。

编辑:再次检查 DOM — 它确实是同位素:$('[class*=isotope]').length>0 === true

关于jquery - 响应式(?)网格系统,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16900438/

相关文章:

jquery .on ('input' ) 不会单独在 ie8 中被触发

memory-management - jQuery .live() 是否更占用内存?

php - 为什么通过 PHP heredoc 生成简单的 HTML?

html - 在 Internet Explorer 7 中使用 z-Index 定位 div

javascript - 如何使喜欢后出现的Facebook评论框显示在上方而不是下方

jquery - 更改所选选项的 css 元素

javascript - 克隆无法正常工作

javascript - 如何在已选中的表中设置复选框?

php - 如何自动关闭截断段落中的标签

javascript - 如何使用 -moz-transform 永久更改 css 元素?