scss 使用Animate.css的Bootstrap模态

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了scss 使用Animate.css的Bootstrap模态相关的知识,希望对你有一定的参考价值。

<?php 
    include('career-areas--data.php');
    include('career-areas--lightbox.php');
    $x = 1; 
    foreach($career_areas as $career_area) { ?>
    <div class="item item--<?php echo $x; ?>">
        <h2 class="career--title"> <?php echo $career_area['title']; ?> </h2>
        <p class="career--copy"> <?php echo $career_area['copy']; ?> </p>
        <p class="career--link" data-toggle="modal" data-target="#careerArea<?php echo $x; ?>"> 
            Learn More
    </p>
    </div>
<?php $x++; } ?>


<?php $x = 1; foreach($career_areas as $career_area) { ?>
    <!-- Modal -->
    <div class="modal fade" id="careerArea<?php echo $x; ?>" role="dialog">
        <div class="modal-dialog">

            <!-- Modal content-->
            <div class="modal-content">
                <div class="modal--image" style="background: linear-gradient(rgba(0,0,0,0),rgba(0,0,0,0)),url(assets/build/img/lightbox/engineering.jpg) no-repeat center center / cover;">
                    <div class="modal--wrapper">
                        <div class="item item--1">
                            <h1 class="modal--title">Global Career Areas</h1>
                            <h2 class="modal--career-title"> <?php echo $career_area['title']; ?> </h2>
                            <p>
                                Join our 8,000 high-performing engineers and work on developing solutions that redefine ‘state-of-the-art’. Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing.
                            </p>
                            <p>
                                <a href="javascript:void(0);" class="btn btn-default modal--link">View Opportunities</a>
                            </p>
                            <button type="button" class="btn btn-blue modal--close" data-dismiss="modal">
                                <span class="sr-only">Close</span>
                            </button>
                            <button type="button" class="btn btn-default btn-prev">Prev</button>
                            <button type="button" class="btn btn-default btn-next">Next</button>
                        </div>
                        <div class="item item--2">
                            <img class="img-responsive" src="assets/build/img/lightbox/engineering.jpg" alt="">
                        </div>
                    </div>
                </div>
            </div>
            <!-- /.Modal content-->

        </div>
    </div>
<?php $x++; } ?>

function modalAnim(x) {
    $('.modal .modal-dialog').attr('class', 'modal-dialog  ' + x + '  animated');
};
$('.modal').on('show.bs.modal', function (e) {
  var anim = 'fadeIn'; // define entrance animation
      modalAnim(anim);
});
$('.modal').on('hide.bs.modal', function (e) {
  var anim = 'fadeOut'; // define exit animation
      modalAnim(anim);
});
@import 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.1/animate.min.css';

以上是关于scss 使用Animate.css的Bootstrap模态的主要内容,如果未能解决你的问题,请参考以下文章

相当于少的Scss:@import(内联)“my.css”

如何在 vue 3 vite 中使用 sass 扩展?

css3 动画库Animate.css使用

css3动画animate.css的使用

animate.css不生效

vue使用animate.css