简体   繁体   English

上下滑动Div-Bootstrap 3

[英]Slide up and Slide down Div - Bootstrap 3

I'm currently working on Bootstrap 3 and making the HTML Markup but I don't know how to make this type of widget 我目前正在使用Bootstrap 3并制作HTML标记,但我不知道如何制作此类小部件

On click “Need help?” should slide down and hide and below div slide up in it's place ... When the cross is clicked popup should hide and “Need help?” slide up again. 单击时,“需要帮助?”应向下滑动并隐藏,而在div下方则应在其上方向上滑动...单击十字架后,弹出窗口应隐藏并“需要帮助?”再次向上滑动。

HTML Markup below 下面的HTML标记

<div class="col-md-12 col-sm-12 col-xs-12 helpContainer no-gutter">
                            <div class="col-md-12 col-sm-12 col-xs-12 no-gutter">
                                <a href="#" class="HelpButton">Need help? <i class="fa fa-plus"></i></a>
                            </div><!-- col-md-12 -->
                            <div class="col-md-6 col-sm-6 col-xs-12 no-gutter">
                                <div class="col-md-12 col-sm-12 col-xs-12">
                                    <a href="#" class="CloseButton"><i class="fa fa-times"></i></a>
                                </div><!-- col-md-12 -->
                                <p class="HelpPopup">Not sure which service offers the greatest return on investment for your company? <a href="#">We can help</a></p>
                            </div><!-- col-md-12 -->
                        </div><!-- col-md-12 -->

Please let me know how this is possible. 请让我知道这是怎么可能的。

Here is the screenshot for better understanding 这是屏幕截图,可让您更好地理解

Image Link 图片链接

If you're using bootstrap, why not use it's included Collapse functionality provided with the boostrap JavaScript files. 如果您使用的是引导程序,为什么不使用它包含在boostrap JavaScript文件中的“折叠”功能。

See here: http://getbootstrap.com/javascript/#collapse 看到这里: http : //getbootstrap.com/javascript/#collapse

Without seeing how you are trying to achieve this on the client side it's hard to make suggestions on just your HTML markup. 不了解您如何在客户端上实现这一目标,很难仅对HTML标记提出建议。 For a quick and easy option, use the Bootstrap JS includes and add a few extra tags to let that do the binding for you :). 为了方便快捷地选择,请使用Bootstrap JS包含,并添加一些额外的标签,以便为您完成绑定:)。 If you need extra functionality such as hiding buttons when one is clicked that can be achieved quite easily in jQuery. 如果您需要额外的功能,例如单击时隐藏按钮,可以在jQuery中轻松实现。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM