【问题标题】:overflow auto, scroll, property is not working溢出自动,滚动,属性不起作用
【发布时间】:2017-03-14 04:12:50
【问题描述】:

我找到了这个我真正爱上的主题。

start bootstrap template

我想用这个主题制作我的 Portfolio 网站,但这里是我希望它实现的一些更改。

当您单击其中任何一个缩略图时,其他图像会立即弹出,这是您希望它展示的主要图像。我希望该图像很大,可能 1280 像素并且溢出自动或可滚动

我给了父 div 溢出属性 auto,但它不起作用。然后,我改成scroll,还是不行

这里是 HTML:

<section class="no-padding" id="portfolio">
    <div class="container-fluid">
        <div class="row no-gutter popup-gallery">
            <div class="col-lg-8 col-lg-offset-2 text-center portfolio_text_padding">
                <h2 class="section-heading">Portfolio</h2>
                <hr class="light color">
                <p class="text-faded portfolio">
                    Portfolio time another word it is time to showcase the work.
                </p>
            </div>
            <div class="col-lg-4 col-sm-6">
                <a href="img/portfolio/bkg.png" class="portfolio-box" >
                    <img src="img/portfolio/thumbnails/1.jpg" class="img-responsive" alt="">
                    <div class="portfolio-box-caption">
                        <div class="portfolio-box-caption-content">
                            <div class="project-category text-faded">
                                Category
                            </div>
                            <div class="project-name">
                                Project Name
                            </div>
                        </div>
                    </div>
                </a>
            </div>
        </div>
    </div>
</section>

所以我要放在这些缩略图中的图像是 1400 像素 x 2000 像素,我从behance得到这个想法

非常感谢。

【问题讨论】:

    标签: css html twitter-bootstrap-3 overflow behance-api


    【解决方案1】:

    https://css-tricks.com/almanac/properties/o/overflow/

    在这个fiddle你可以试一试

    http://jsfiddle.net/x58RD/

    #mydiv {
        overflow: auto;
        max-width: 800px;
        max-height: 600px;
    }
    

    将 HTML 中的 URL 替换为:http://abduzeedo.com/sites/default/files/styles/home_cover/public/originals/wpw_1400px.jpg?itok=IeiXQvLh

    然后点击运行

    希望这会有所帮助:) 告诉我

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-11-11
      • 1970-01-01
      • 2023-03-05
      • 2021-04-28
      • 2016-06-22
      • 1970-01-01
      • 1970-01-01
      • 2014-06-21
      相关资源
      最近更新 更多