How to make a Modal Portfolio appear from left to right?

Asked

Viewed 568 times

2

Portfolio Modal, example: http://ironsummitmedia.github.io/startbootstrap-freelancer/

I want to modify the animation of the Modal Portfolio (bootstrap).

I want it to appear from left to right similar to that: http://jsfiddle.net/gtw7375/o9jd3v6n/

How can I do that?

HTML:

<li><a href="#portfolioModal1" class="portfolio-link" data-toggle="modal">   OPEN FROM LEFT TO CENTER</a></li>




 <div class="portfolio-modal modal fade" style="position: fixed" id="portfolioModal1" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-content"><div class="container">
            <div class="row">
                <div class="col-lg-8 col-lg-offset-2">
                    <div class="modal-body">
                        <h2>Project Title</h2>
                      <p>
                       Content
                      </p>
                        <button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-times"></i> Close</button>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

CSS:

/* Container (white background) where are the modal information. Only decreases the width of it so that it fits in the animation I want. */

.portfolio2-modal .modal2-content {
    padding: 100px 0;
    min-height: 100%;
    width: 78%;border: 0;
    border-radius: 0;
    text-align: center;
    background-clip: border-box;
    -webkit-box-shadow: none;
    box-shadow: none;
}

I GOT! I modified it directly in Bootstrap:

.modal.fade .modal-dialog {
  -webkit-transition: -webkit-transform .3s ease-out;
       -o-transition:      -o-transform .3s ease-out;
          transition:         transform .3s ease-out;
  -webkit-transform: translate(-25%, 0);
      -ms-transform: translate(-25%, 0);
       -o-transform: translate(-25%, 0);
          transform: translate(-25%, 0);

1 answer

2

Follow the same property CSS that’s in that Fiddle. Put that down in your code CSS.

.modal.fade .modal-content {
  transform: translate3d(-30%, 0, 0);
}

.modal.in .modal-content {
  transform: translate3d(0, 0, 0);
}

Browser other questions tagged

You are not signed in. Login or sign up in order to post.