jquery - Portfolio Grid随机间距@media查询

标签 jquery html css grid portfolio

我在这个网站上使用“Megafolio”jQuery 插件(http://codecanyon.net/item/megafolio-gallery-jquery-plugin/980161):http://www.playwinterpark.com/activity_directory_summer.html .一切正常,直到最小的移动调整大小,这会在一些图像之后(或之前)随机创建一些非常有趣的空白(即在“骑自行车”和“划船”之间“打高尔夫球”和“徒步旅行”之间)。有没有人处理过这个问题之前?最重要的是,我该如何解决这个问题?!有什么帮助。我的代码在下面。

提前致谢!

图像 CSS:

.cell1x1, .cell1x2, .cell2x1, .cell2x2 {
background-color: #FFFFFF;
overflow: hidden;

组合脚本选项

<script type="text/javascript">

            $(document).ready(function() {

                <!--    PORTFOLIO   -->
                 $("#products").portfolio({ 
                    <!-- GRID SETTINGS -->
                    gridOffset:6,               <!-- Manual Right Padding Offset for 100% Width -->
                    cellWidth:150,                      <!-- The Width of one CELL in PX-->
                    cellHeight:150,                     <!-- The Height of one CELL in PX-->
                    cellPadding:6,                      <!-- Spaces Between the CELLS -->
                    entryProPage:30,                        <!-- The Max. Amount of the Entries per Page, Rest made by Pagination -->

                    <!-- CAPTION SETTING -->
                    captionOpacity:75,

                    <!-- FILTERING -->
                    filterList:"#portfolio-filter",     <!-- Which Filter is used for the Filtering / Pagination -->
                    title:"#selected-filter-title",     <!-- Which Div should be used for showing the Selected Title of the Filter -->                                              
                    <!-- Page x from All Pages -->
                    pageOfFormat:"Page #n of #m",       <!-- The #n will be replaced with the actual Item Nr., #m will be replaced with the amount of all items in the filtered Gallery-->                      
                    <!-- Social Settings-->
                    showGoogle:"no",                    <!-- Show The Social Buttons ...-->
                    showFB:"no",
                    showTwitter:"no",
                    urlDivider:"?",                     <!-- What is the Divider in the Url to add the Variables, Filter and Image ID . Impotant for WordPress i.e. Social will share this link with this divider -->

                    showEmail:"no",                         <!-- ADD EMAIL TO LINK ALSO TO THE LIGHTBOX  -->
                    emailLinkText:"Email to Friend",
                    emailBody:"mailto:email@echoecho.com?body=I found some great File here #url",   <!-- The #url will be replaced with the url of the image -->
                    emailUrlCustomPrefix:"http://www.themepunch.com/",                              <!-- Use this if you wish a Custom Prefix to Link Path -->                      
                    emailUrlCustomSuffix:"?ref=...",                                                <!-- Use This if you wish to use a Custtom Suffix for Link Path -->


                    <!-- BACKGROUND -->
                    backgroundHolder:"#main-background",
                    backgroundSlideshow:0
                })  





        });

最佳答案

好吧,既然你已经在你的 html 中硬编码了图像,你可能想要为移动设备放置一个 mediaQuery,使所有图像的宽度都达到 100% ....像这样:

 @media only screen and (max-width : 480px) {
   /* Smartphone view: 1 tile */
   .catall img {
      width: 100%;
   }
}

关于jquery - Portfolio Grid随机间距@media查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18775516/

相关文章:

jquery - 如何将 div 框相互定位

html - 并排 float 无符号列表中的 2 个元素

jquery - 是否可以使用 jquery 更改 $(document) 宽度?

jquery - 关于事件的 ie 问题 -jquery

javascript - 从 Google Maps Javascript 中删除标记

javascript - html 中的 data-reveal-id 属性到底是什么?与经典 id 属性有什么区别?

javascript - 如何将其自动化为 for 循环?

javascript - 如何停止鼠标垂直滚动

javascript - 上下文菜单不适用于新内容

html - 使图像适应容器大小