1

我在我的 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>
4

1 回答 1

0

解决了

目的是,在我的Home.css文件中是那一行:

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

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

于 2012-07-20T18:13:06.157 回答