附加主CSS文件时,blueimp jQuery文件上传插件不起作用?

时间:2012-07-20 16:30:07

标签: jquery file-upload blueimp

我已经在我的MVC 3项目中添加了https://github.com/blueimp/jQuery-File-Upload插件。什么是非常令人惊讶的,当我在Layout.cshtml文件中时,我有那条线

<link href="@Url.Content("~/Content/Home.css")" rel="stylesheet" type="text/css" />

单击file dialog按钮时,Browse for files未显示。 此外,即使Home.css文件为空,也会发生同样的情况

如果我只删除<link .... />声明插件工作正常。任何人都可以向我解释为什么会发生这种魔法吗?

以下是该插件所需包含的完整列表,可能有用

<link href="/Content/Site.css?cdv=1" type="text/css" rel="stylesheet"/>
<link href="/Content/Bootstrap/bootstrap.min.css?cdv=1" type="text/css" rel="stylesheet"/>
<link href="/Content/Bootstrap/bootstrap-responsive.min.css?cdv=1" type="text/css" rel="stylesheet"/>
<link href="/Content/Bootstrap/bootstrap-image-gallery.min.css?cdv=1" type="text/css" rel="stylesheet"/>
<link href="/Content/FileUpload/jquery.fileupload-ui.css?cdv=1" type="text/css" rel="stylesheet"/>   

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js?cdv=1" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js?cdv=1" type="text/javascript"></script>

<script src="/Content/FileUpload/load-image.min.js?cdv=1" type="text/javascript"></script>
<script src="/Content/FileUpload/canvas-to-blob.min.js?cdv=1" type="text/javascript"></script>
<script src="/Content/FileUpload/tmpl.min.js?cdv=1" type="text/javascript"></script>
<script src="/Content/Bootstrap/bootstrap.min.js?cdv=1" type="text/javascript"></script>
<script src="/Content/Bootstrap/bootstrap-image-gallery.min.js?cdv=1" type="text/javascript"></script>
<script src="/Content/FileUpload/jquery.fileupload.js?cdv=1" type="text/javascript"></script>
<script src="/Content/FileUpload/jquery.iframe-transport.js?cdv=1" type="text/javascript"></script>
<script src="/Content/FileUpload/jquery.fileupload-ip.js?cdv=1" type="text/javascript"></script>
<script src="/Content/FileUpload/jquery.fileupload-ui.js?cdv=1" type="text/javascript"></script>
<script src="/Content/FileUpload/locale.js?cdv=1" type="text/javascript"></script>
<script src="/Content/FileUpload/main.js?cdv=1" type="text/javascript"></script>

1 个答案:

答案 0 :(得分:0)

解决

我的Home.css文件的目的是:

input[type="file"] { width: 285px; background: white; }

当我删除它时,插件开始正常工作。糟...