【发布时间】:2014-08-19 07:23:46
【问题描述】:
我已经在我的 ASP.MVC 4 上成功实现了 dropzone.js。 但我需要缩短下拉区域的高度并翻译文本。 有什么简单的方法可以做到这一点?我试图修改 CSS 没有结果;下拉区域仍然采用相同的高度。
【问题讨论】:
标签: dropzone.js
我已经在我的 ASP.MVC 4 上成功实现了 dropzone.js。 但我需要缩短下拉区域的高度并翻译文本。 有什么简单的方法可以做到这一点?我试图修改 CSS 没有结果;下拉区域仍然采用相同的高度。
【问题讨论】:
标签: dropzone.js
终于有自己的答案了:
<html>
<head >
<meta name="viewport" content="width=device-width" />
<title>Index2</title>
<script src="/media/dropzone.js"></script>
<link href="~/Media/css/basic.css" rel="stylesheet" />
<link href="~/Media/css/dropzone.css" rel="stylesheet" />
</head>
<body>
<style>
.dropzone-previews {
height: 200px;
width: 500px;
border: dashed 1px red;
background-color: lightblue;
}
</style>
<div id="previews" class="dropzone-previews"></div>
<button id="clickable">Click me to select files</button>
<script>
new Dropzone("div#previews", { // Make the whole body a dropzone
url: "/home/fileUpload", // Set the url
previewsContainer: "#previews", // Define the container to display the previews
clickable: "#clickable", // Define the element that should be used as click trigger to select files.
maxFiles:5,
acceptedFiles:"image/*,application/pdf"
});
</script>
</body>
【讨论】: