GithubHelp home page GithubHelp logo

hash-bang / bootstrap-modal-transition Goto Github PK

View Code? Open in Web Editor NEW

This project forked from washaweb/bootstrap-modal-transition

0.0 3.0 0.0 164 KB

Some cool css transition effects form Bootstrap 3 modals

License: GNU General Public License v2.0

CSS 100.00%

bootstrap-modal-transition's Introduction

bootstrap-modal-transition

Some smooth css transition effects to extend Bootstrap 3 modals

Intro

Bootstrap comes with just a simple fade transition for modals display. If you like having choice, just add 'bootstrap-modal-transition.less' to your Bootstrap 3 LESS project and it will extends modals with these new transitions :

  • zoom
  • newspaper
  • move-horizontal
  • move-from-top
  • unfold-3d
  • zoom-out

In addition, the use of modernizr will change the unfold-3d transition with a real 3d transform transition on supported browsers.

Example

Add the less file to your bootstrap 3 project add compile your code. In the Modal HTML, add the transition you like :

<div class="modal fade <transition-type>" id="myModalId" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
        ...
        </div>
    </div>
</div>

Where is your prefered transition. For example, if you want to use the 'unfold-3d' transition, your code will look like this :

<div class="modal fade unfold-3d" id="myModalId" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
        ...
        </div>
    </div>
</div>

As you can see, the default 'fade' transition class has to be preserved in order to keep the 'transitionEnd' added by the Bootstrap modal javascript. More information about modal dialogs in bootstrap 3 can be found here

Enjoy ;)

bootstrap-modal-transition's People

Contributors

washaweb avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.