我目前正在为我的网站构建一个投资组合页面。
我列出了我的客户&他们的徽标和在点击徽标时,将出现一个模态窗口,其中将提供有关工作如何完成的详细信息。
目前问题是我编写了一个虚拟代码,只是为了测试当我点击第一个客户端时出现的模态窗口,不幸的是模态窗口没有打开。
帮助我和人让我知道我的代码是错误的:)
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<!-- Custom styles for this template -->
<link rel="stylesheet" type="text/css" href="style.css">
<title>Yorker Strategy</title>
</head>
<body>
<nav class="navbar navbar-fixed">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="index.html">
<img alt="Yorker Strategy Logo" src="img/Logo.png">
</a>
</div>
<div>
<ul class="nav navbar-nav navbar-right">
<li><a href="about.html" class="gisha">About</a></li>
<li><a href="services.html" class="gisha">Services</a></li>
<li><a href="portfolio.html" class="gisha">Portfolio</a></li>
<li><a href="contact.html" class="gisha">Contact Us</a></li>
</ul>
</div>
</div>
</nav>
<!-- Separator -->
<div class='col-lg-12 separator'>
</div>
<div class='divHeader'><!-- Who are we section -->
<div class="container"><!--container-->
<div class="row"><!-- Who are we Title -->
<div class='col-lg-4'></div>
<div class='col-lg-4 divHeaderContent text-center'>
<h1><br>Portfolio</h1>
</div>
<div class='col-lg-4'></div>
</div><!-- End of Who are we Title -->
<br><br>
</div><!--End of container-->
</div>
<div class='portfolio'><!-- Portfolio section -->
<div class="container"><!--container-->
<div class='whoAreWeBodyBorder'>
<div class="row portfolioRowHeight"><!-- First Portoflio Row -->
<a href='#' data-toggle='modal' data-target='#modala&s' >
<div class='col-lg-4'>
<img src="img/client1-a&s.png" class='img-resposive clientLogos'/>
<div class="separator"></div>
<br>
<h4 class="gisha text-center">Services Delivered</h4>
<br>
<p class='mvBoli text-center'>Brand Makeover</p>
</div>
</a>
<div class="modal fade" id='modala&s'>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button class='close' data-dismiss='modal'>×</button>
<h4>Title</h4>
</div>
<div class="modal-body">
<p>Para</p>
</div>
<div class="modal-footer">
<button class='btn btn-default' data-dismiss='modal'>Close</button>
</div>
</div>
</div>
</div>
<div class='col-lg-4'>
<a href='#'>
<img src="img/client2-malav.png" class='img-resposive clientLogos'/>
<div class="separator"></div>
<br>
<h4 class="gisha text-center">Services Delivered</h4>
<br>
<p class='mvBoli text-center'>Brand Makeover</p>
<p class='mvBoli text-center'>Brand Essentials - Website & Catalogue</p>
</a>
</div>
<div class='col-lg-4'>
<a href='#'>
<img src="img/client3-jp.png" class='img-resposive clientLogos'/>
<div class="separator"></div>
<br>
<h4 class="gisha text-center">Services Delivered</h4>
<br>
<p class='mvBoli text-center'>Brand Creation</p>
</a>
</div>
</div><!-- End of First Portoflio Row -->
<div class="row portfolioRowHeight"><!-- Second Portoflio Row -->
<div class='col-lg-4'>
<a href='#'>
<img src="img/client4-higs.png" class='img-resposive clientLogos'/>
<div class="separator"></div>
<br>
<h4 class="gisha text-center">Services Delivered</h4>
<br>
<p class='mvBoli text-center'>Brand Creation</p>
<p class='mvBoli text-center'>Brand Essentials - Website</p>
</a>
</div>
<div class='col-lg-4'>
<a href='#'>
<img src="img/client5-aep.png" class='img-resposive clientLogos'/>
<div class="separator"></div>
<br>
<h4 class="gisha text-center">Services Delivered</h4>
<br>
<p class='mvBoli text-center'>Brand Essentials - Website & Brochure</p>
</a>
</div>
<div class='col-lg-4'>
<a href='#'>
<img src="img/client6-et.png" class='img-resposive clientLogos'/>
<div class="separator"></div>
<br>
<h4 class="gisha text-center">Services Delivered</h4>
<br>
<p class='mvBoli text-center'>Brand Essentials - Mascot & Brochure</p>
</a>
</div>
</div><!-- End of Second Portoflio Row -->
</div>
</div><!--End of container-->
</div><!-- End of Portfolio section -->
<br><br>
<div class='footer'>
<div class="container">
<div class='row'>
<div class='col-lg-12 smIcons text-center'>
<ul>
<li><img src='img/fb.png'</li>
<li><img src='img/tw.png'</li>
<li><img src='img/ig.png'</li>
<li><img src='img/in.png'</li>
</ul>
</div>
</div>
<div class="row">
<div class='col-lg-12 text-center gisha copyrightText'>
<p>Copyright Yorker Strategy, 2016</p>
</div>
</div>
</div>
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
测试模式位于div下,类名为portfolio,位于&#39; col-lg-4&#39;的第一列。这是一个保持在&#39; a&#39;标签
请帮助别人!
答案 0 :(得分:2)
尝试使用其他选择器
更改
modala&s
到
modalas
(在锚和模态中)
为什么呢?查看关于&amp ;;的XML规范。符号