我在使用bootstrap模式显示在线投资组合中的项目时遇到问题。一切都在电脑上运行良好。但是,当我在移动设备上打开模态并点击模态内的任何位置时,它会自动关闭它。我只想在用户点击关闭按钮时关闭它,否则我无法在模态中使用旋转木马,表格或视频,因为它会在您触摸控件时立即关闭它。我使用代理引导主题作为我在线投资组合的起点。在http://www.spdesign.org/2017/查看我的投资组合页面的草稿这是我用于打开模态的html示例:
<a href="#portfolioModal-posters-1" class="portfolio-link" data-toggle="modal"><img src="img/simages/graphic design/posters/5.jpg" alt=""></a>
<!-- Portfolio Modal 1 -->
<div class="portfolio-modal modal fade" id="portfolioModal-posters-1" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="close-modal" data-dismiss="modal">
<div class="lr">
<div class="rl">
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2">
<div class="modal-body">
<!-- Project Details Go Here -->
<h2>Poster Design</h2>
<p class="item-intro text-muted">Poster designed for Center for Translational and Basic Research (former Gene Center) at Hunter College, City Iniversity of New York</p>
<img class="img-responsive img-centered" src="img/bimages/graphic design/posters/5.jpg" alt="">
<p>Creative concept, Poster and other promotional materials designed to promote conferences and seminars orginized by The Office of Diversity Affairs at New York University School of Medicine</p>
<button type="button" class="btn btn-primary" data-dismiss="modal"><i class="fa fa-times"></i> Close Project</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>