FineUploader中的qq-drop-area-text如何添加HTML?
How do you add HTML to the qq-drop-area-text in FineUploader?
我想向 FineUploader 的 qq-drop-area-text
添加 Font Awesome 图标和其他样式(例如 <em>
)。这可能吗?看起来文本是使用 CSS content
区域设置样式的。
来自 FineUploader 的示例 HTML:
<div class="qq-uploader-selector qq-uploader" qq-drop-area-text="Drop files here!">...</div>
期望:
<div class="qq-uploader-selector qq-uploader" qq-drop-area-text="<span class='fa fa-upload'></span> Drop files <em>here</em>!">...</div>
谢谢
要向拖放区消息添加更多样式,只需在项目的 CSS 文件中包含以下内容:
.qq-uploader:before {
// dropzone text styles go here
}
.qq-uploader:before {
/*content: attr(qq-drop-area-text) " ";*/
font-family: FontAwesome, 'Open Sans', Arial;
content: "\f0c5 Drop files here";
position: absolute;
font-size: 200%;
left: 0;
width: 100%;
text-align: center;
top: 45%;
opacity: 0.25;
}
这是我的示例,其中 f0c5
是我想要使用的 Font Awesome 图标的 Unicode 值。在本例中,它是 fa-files-o
图标。单击 Font Awesome list of icons 上的任意图标以显示其 Unicode 值。
我想向 FineUploader 的 qq-drop-area-text
添加 Font Awesome 图标和其他样式(例如 <em>
)。这可能吗?看起来文本是使用 CSS content
区域设置样式的。
来自 FineUploader 的示例 HTML:
<div class="qq-uploader-selector qq-uploader" qq-drop-area-text="Drop files here!">...</div>
期望:
<div class="qq-uploader-selector qq-uploader" qq-drop-area-text="<span class='fa fa-upload'></span> Drop files <em>here</em>!">...</div>
谢谢
要向拖放区消息添加更多样式,只需在项目的 CSS 文件中包含以下内容:
.qq-uploader:before {
// dropzone text styles go here
}
.qq-uploader:before {
/*content: attr(qq-drop-area-text) " ";*/
font-family: FontAwesome, 'Open Sans', Arial;
content: "\f0c5 Drop files here";
position: absolute;
font-size: 200%;
left: 0;
width: 100%;
text-align: center;
top: 45%;
opacity: 0.25;
}
这是我的示例,其中 f0c5
是我想要使用的 Font Awesome 图标的 Unicode 值。在本例中,它是 fa-files-o
图标。单击 Font Awesome list of icons 上的任意图标以显示其 Unicode 值。