所以我有一个无花果字幕的代码和一个显示在手机和平板电脑上的模态,但我想让模态打开我的标题,而不是在模态中再次写标题。
我有很多带字幕的图片,所以这是最佳的
这怎么可能?
由于
<div class="col-5 col-sm-2 ml-auto aboutMid aboutMid1">
<figure class="cap-left">
<img src="http://www.classichits.ie/wp-content/uploads/2016/12/house.png" class="img-fluid">
<a href="#myModal" role="button" data-toggle="modal" class="d-inline d-lg-none"><figcaption>
The house is a converted farm building featuring traditional wooden shutters and terracotta toof tiles
</figcaption></a>
<figcaption class="d-none d-lg-inline">
The house is a converted farm building featuring traditional wooden shutters and terracotta toof tiles
</figcaption>
</figure>
</div>
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="#myModal" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="ModalLabel">Here is a Modal title</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
Here goes the content of the modal.
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-warning">Save</button>
</div>
</div>
</div>
</div>
<div class="col-5 col-sm-2 mr-auto mr-sm-0 aboutMid aboutMid1">
<figure class="cap-left">
<img src="assets/about/about2.jpg" class="img-fluid">
<figcaption>
The large garden features breathtaking views of the valley and Puilaurens Castle </figcaption>
</figure>
</div>