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

2

Modal Portfolio, example: link

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

I want it to appear from left to right similar to this: link

How can I do this?

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 was able to! Modified 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);
    
asked by anonymous 14.12.2015 / 19:15

1 answer

2

Follow the same CSS property that is in this Fiddle. Put this below in your CSS tag.

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

.modal.in .modal-content {
  transform: translate3d(0, 0, 0);
}
    
14.12.2015 / 19:36