다음 코드는 http://fancyapps.com/fancybox/3/docs/#usage의 데모 코드를 기반으로합니다. 이미지 용 라이트 박스를 표시하려고하지만 코드가 작동하지 않습니다. 이유가 무엇입니까?데모 코드처럼 fancyBox3을 사용하면 라이트 박스를 표시 할 수 없습니다. 이유가 무엇입니까?
받는 사람 : Rick, 코드로 코드를 수정했지만 아직 작동하지 않습니다. 이유가 무엇입니까?
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>My page</title>
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="jquery.fancybox.min.css">
</head>
<body>
<!-- Your HTML content goes here -->
<a href="bmp/logo.png" data-fancybox data-caption="My caption">
<img src="bmp/logo.png" alt="" />
</a>
<!-- JS -->
<script src="//code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="jquery.fancybox.min.js"></script>
</body>
</html>
수정 된 코드도 작동하지 않습니다.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>My page</title>
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="jquery.fancybox.min.css">
</head>
<body>
<!-- Your HTML content goes here -->
<a href="bmp/logo.png" data-fancybox data-caption="My caption">
<img src="bmp/logo.png" alt="" />
</a>
<!-- JS -->
<script src="//code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="jquery.fancybox.min.js"></script>
<script type="text/javascript">
$("[data-fancybox]").fancybox({
// Options will go here
});
</script>
</body>
</html>
을 당신은'console.log'에 오류를받을 수 있나요 아마 –
을 옵션을 설정해야합니까? –
이 피요를보십시오 https://jsfiddle.net/uy5hjntv/ –