首页 > 解决方案 > 手风琴面板内容不滚动

问题描述

再会,

我的网站遇到了一个非常奇怪的问题。我正在尝试做的是在我的手风琴面板中放置一个 Time.ly 日历小部件。如果您在“锦标赛:http : //www.rthhockey.com/onehockey /tcs-hockey,我只是从工作页面复制和粘贴代码,只是替换日历脚本,它没有按预期滚动。在另一个页面上,http://www.rthhockey.com/canlan,它只是滚动它应该是的一部分。从本质上讲,日历脚本是唯一改变的东西,我可以说。只是组织者的编号发生了变化。这对我来说很奇怪,但也许你们中的一些专业人士可能有一个简单的解决方案。我尝试过使用面板和手风琴的高度,但无济于事。预先感谢您提供的任何帮助。

CSS

.ac-container {
    max-width: 810px;
}

.ac-container label {
    height: 50px !important;
    line-height: 50px !important;
    font-size: 26px !important;
    font-family: 'Open Sans';
    padding: 5px 15px;
    position: relative;
    z-index: 20;
    display: block;
    height: 30px;
    cursor: pointer;
    color: #ff6600;
    line-height: 50px;
    font-size: 26px;
    background: #ffffff;
    font-size: 26px;
    height: 30px;
    line-height: 50px;
    border: 1px solid #ff6600;
}

.ac-container {
    width: 100%;
    margin: 10px auto 30px auto;
    text-align: left;
}

.ac-container label:hover {
    background: #fff;
}

.ac-container input:checked + label,.ac-container input:checked + label:hover {
    background: #ffffff;
    color: #ff6600;
    height: 30px;
    line-height: 21px;
    font-size: 13px;
}

.ac-container label:hover:after,.ac-container input:checked + label:hover:after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    right: 13px;
    top: 7px;
    background: none;
}

.ac-container input:checked + label:hover:after {
    background-image: none;
}

.ac-container input {
    display: none;
}

.ac-container article {
    background: #ffffff;
    margin-top: -5px;
    overflow: hidden;
    height: 0;
    position: relative;
    z-index: 10;
    -webkit-transition: height 0.3s ease-in-out,box-shadow 0.6s linear;
    -moz-transition: height 0.3s ease-in-out,box-shadow 0.6s linear;
    -o-transition: height 0.3s ease-in-out,box-shadow 0.6s linear;
    -ms-transition: height 0.3s ease-in-out,box-shadow 0.6s linear;
    transition: height 0.3s ease-in-out,box-shadow 0.6s linear;
}

.ac-container article p {
    font-style: normal;
    color: #494949;
    line-height: 23px;
    font-size: 10px;
    padding: 5px;
    font: normal normal 12px 'Open Sans';
}

.ac-container input:checked ~ article {
    -webkit-transition: height 0.5s ease-in-out,box-shadow 0.1s linear;
    -moz-transition: height 0.5s ease-in-out,box-shadow 0.1s linear;
    -o-transition: height 0.5s ease-in-out,box-shadow 0.1s linear;
    -ms-transition: height 0.5s ease-in-out,box-shadow 0.1s linear;
    transition: height 0.5s ease-in-out,box-shadow 0.1s linear;
    box-shadow: 0 0 0 1px rgba(155,155,155,0.3);
}

.ac-container input:checked ~ article.ac-small {
    height: 390px;
}

.ac-container input:checked ~ article.ac-medium {
    height: 420px;
}

.ac-container input:checked ~ article.ac-large {
    height: 230px;
}
div.scroll {
   max-height: 1250px;
   overflow: auto;
}
.timely-stream:not(.timely-agenda) .timely-event {
 min-height:92px; !important
}
.timely-title-text,
.timely-details-container{ 
font-size:67%;
}  

HTML

<section class="ac-container">
                <div>
                    <input id="ac-1" name="accordion-1" type="radio" >
                    <label for="ac-1">TOURNAMENTS</label>
                    <article class="ac-small">
                        <div class="scroll">
<script src="//dashboard.time.ly/js/embed.js" data-src="https://events.time.ly/hye2ww2?categories=21029&organizers=43496" data-max-height="0" id="timely_script" class="timely-script"></script>
</div>
                    </article>
                </div>
                <div>
                    <input id="ac-2" name="accordion-1" type="radio" checked="">
                    <label for="ac-2">OneHockey</label>
                    <article class="ac-medium">
                        <a href="http://www.rthhockey.com" target="_blank"><img src="https://i.imgur.com/HJwXuym.png?2" title="OneHockey Events" /></a>
                    </article>
                </div>
                <div>
                    <input id="ac-3" name="accordion-1" type="radio">
                    <label for="ac-3">INFO</label>
                    <article class="ac-large">
                        Blah, blah, blah
                    </article>
                </div>
            </section>

The 3 differnt script codes that I've used with the 1st being the one that is working:

<script src="//dashboard.time.ly/js/embed.js" data-src="https://events.time.ly/hye2ww2?categories=21029&organizers=43496" data-max-height="0" id="timely_script" class="timely-script"></script>

<script src="//dashboard.time.ly/js/embed.js" data-src="https://events.time.ly/hye2ww2?categories=26034&organizers=46341" data-max-height="0" id="timely_script" class="timely-script"></script>

<script src="//dashboard.time.ly/js/embed.js" data-src="https://events.time.ly/hye2ww2?categories=21029&organizers=43496" data-max-height="0" id="timely_script" class="timely-script"></script>

标签: javascripthtmlcssscrollaccordion

解决方案


这个 div 需要应用“溢出:滚动”。

文章类="ac-small"

示例:article.ac-small {溢出:滚动;}


推荐阅读