Javascript Fancybox宽度未应用-自动调整大小:false不是答案
我认为我在这两篇文章中遇到了同样的问题:Javascript Fancybox宽度未应用-自动调整大小:false不是答案,javascript,jquery,html,asp.net,css,Javascript,Jquery,Html,Asp.net,Css,我认为我在这两篇文章中遇到了同样的问题: 但我已经讨论了这两个问题的解决方案,问题仍然存在 基本上,当我点击图像链接时,宽度和高度属性被忽略,而是显示一个约为30 x30的框。视频正在加载,关闭窗口按钮等都可以工作 我用的是I.E.8/9 我的代码如下: <b> <%@ Page Language="C#" %> <html dir="ltr"> <head runat="server"> <META name="WebPartPa
<b>
<%@ Page Language="C#" %>
<html dir="ltr">
<head runat="server">
<META name="WebPartPageExpansion" content="full">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled 1</title>
<meta name="Microsoft Theme" content="Lacquer 1011, default">
<!-- J Query Includes -->
<script type="text/javascript" src="http://mynationwideteam/sites/financial_performance/JavaScript/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="http://mynationwideteam/sites/financial_performance/JavaScript/jquery.SPServices-0.7.1a.min.js"></script>
<!-- Add fancyBox -->
<link rel="stylesheet" href="http://mynationwideteam/sites/financial_performance/fancybox/source/jquery.fancybox.css?v=2.1.5" type="text/css" media="screen" />
<script type="text/javascript" src="http://mynationwideteam/sites/financial_performance/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
<!-- Optionally add helpers - button, thumbnail and/or media -->
<link rel="stylesheet" href="http://mynationwideteam/sites/financial_performance/fancybox/source/helpers/jquery.fancybox-buttons.css?v=1.0.5" type="text/css" media="screen" />
<script type="text/javascript" src="http://mynationwideteam/sites/financial_performance/fancybox/source/helpers/jquery.fancybox-buttons.js?v=1.0.5"></script>
<script type="text/javascript" src="http://mynationwideteam/sites/financial_performance/fancybox/source/helpers/jquery.fancybox-media.js?v=1.0.6"></script>
<link rel="stylesheet" href="http://mynationwideteam/sites/financial_performance/fancybox/source/helpers/jquery.fancybox-thumbs.css?v=1.0.7" type="text/css" media="screen" />
<script type="text/javascript" src="http://mynationwideteam/sites/financial_performance/fancybox/source/helpers/jquery.fancybox-thumbs.js?v=1.0.7"></script>
<script>
$(document).ready(function() {
$(".fancyvideo").fancybox({
width : 600,
height : 498,
fitToView : false,
autoSize : false,
type : 'swf'
});
});
</script>
</head>
<body>
<a class="fancyvideo" ID="vid1" href="http://www.youtube.com/v/92c3dX-AoXs"><img src="images/Templates/Financial_Performance/banner001.jpg" width="475" height="69" style="border-style: solid; border-width: 2px"></a>
</body>
</html>
</b>
无标题1
$(文档).ready(函数(){
$(“.fancyvideo”).fancybox({
宽度:600,
身高:498,
菲托维:错,
自动调整大小:false,
类型:“swf”
});
});
除非您使用的是具有该属性的旧版本,自动调整大小不存在。尝试使用autoDimensions:false
和/或autoScale:false
尝试强制使用您的内容,例如,您可以这样做(在要包含的文件中):
//你喜欢的内容
这对我有用 抱歉,我应该说我已经尝试了这两种方法,上面的帖子建议我这样做。但这似乎没有什么区别。
<div style="width:600px">
//your fancy content
</div>