首页 > 解决方案 > 模态 gif 不显示

问题描述

Here is My Html Code , It does not want to pop up on the webpage , I have no Idea what I am doing wrong , I have tried different images they also do not display when I try and load them up , They show up when I hover over the Dreamweaver code but not on the localhost testing website , I thought it was linking perhaps or some common typo mistake with my image but I checked and checked again. This is bugging me because I can' t get images to show here 

我尝试了不同的图像,但仍然给我同样的错误,我真的很感激这个问题的一些帮助......我不知道我的代码有什么问题?我也尝试过不同的网页代码,但它仍然给我同样的错误.....我尝试了不同的图像,但仍然给我同样的错误,我真的很感激这个问题的一些帮助......我无法弄清楚我的代码有什么问题?我也尝试过不同的网页代码,但它仍然给我同样的错误.....

<!-- Pop Up Modal Home Owner -->
    <section class="Modal">
        
        <div class="container">
                                
                <div class="modal fade" id="LambdaModal" tabindex="-1" aria-labelledby="LambdaModal" aria-hidden="true">

                    <div class="modal-dialog modal-lg modal-dialog-centered">
                        
                        <div class="modal-content bg-fusion-900 text-black">
                    
                                <div class="modal-header bg-rigifoam-blue">
                            


                                    <div class='col-12 modal-title text-center'>
                                        <h5>Where to look for Lambdaboard</h5>
                                            </div>
                                        
                                                <button type="button" class="btn-close btn-plain-white" data-bs-dismiss="modal" aria-label="Close"></button>
                        
                                                    </div>
                        
                                                        <div class="modal-content">
                                                   
                                                            <img src="http://localhost/blitzdetect/template/_images/animation.gifs" alt="Animated Gif">
                                            
                                                                 <div class="modal-footer bg-rigifoam-blue">
                                                                     
                                                                    <div class='col-12 modal-title text-center'>
                                                                        <h5>A fraction of the places you can find it.</h5>
                                                                    </div>
                            
                                                                </div>
                        
                                                            </div>
                    
                                                        </div>
                
                                                    </div>
            
                                                </div>
        
                                        </section>

    <!-- Pop Up Modal Home Owner End -->

Here is my Javascript code

<script type="text/javascript">
    let current_location = window.location.pathname;
    
    let session_variable = sessionStorage.getItem(current_location);
    
    if(session_variable) {
        console.log("Exists");
    } else {
        console.log("Empty");
        sessionStorage.setItem(current_location, "Modal");
    }
    
$(window).on('load',function(){
  if (!sessionStorage.getItem('shown-modal')){
    $('#LambdaModal').modal('show');
    sessionStorage.setItem('shown-modal', 'true');
  }
}); 

 $("[data-toggle='modal']").modal();
    
    $('#LambdaModal').on('shown.bs.modal', function (e) {
 var bLazy = new Blazy();
})
</script>

标签: javascripthtmlbootstrap-modal

解决方案


推荐阅读