我在ASP.MVC 4上成功实现了dropzone.js。 但我需要缩短下拉区域的高度并翻译文本。 有没有简单的方法呢?我尝试修改CSS没有结果;下拉区域的高度仍然相同。
答案 0 :(得分:12)
最后得到了我自己的答案:
<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>