nanoGallery2 - 如何更改缩略图图标
nanoGallery2 - How to change Thumbnail icon
我正在使用 nanoGallery2,我确实想自定义缩略图图标,在文档中有:
All icons used in the gallery can be customized. By default, an icon
font is used. Example: replace the default album icon with a red one
from Font Awesome:
icons.thumbnailAlbum: '<i style="color:#e00;" class="fa fa-search-plus"></i>'
但我正在尝试使用评论图标,如下所示:
icons: { thumbnailCustomTool1 : '<i class="fa fa-comment" aria-hidden="true"></i>'}
或
icons: { thumbnailCustomTool1 : '<i class="fa fa-comment"></i>'}
或
icons: { thumbnailCustomTool1 : '<i class="icon-comment"></i>'}
或
icons: { thumbnailCustomTool1 : '<i class="nGY2Icon icon-comment"></i>'}
并且不起作用:(
但有些图标效果很好..比如..
icons: { thumbnailCustomTool1 : '<i class="nGY2Icon icon-star"></i>'}
更换图标的正确方法是什么?
谢谢大家
nanogallery2 使用自定义字体,基于 font awesome 中的一些图标。
要使用其他图标字体的图标,您是否在 HTML 页面中添加了相应的字体?
字体很棒:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" />
这是 CodePen 上的完整工作示例:https://codepen.io/Kris-B/pen/EWmqdd
我正在使用 nanoGallery2,我确实想自定义缩略图图标,在文档中有:
All icons used in the gallery can be customized. By default, an icon font is used. Example: replace the default album icon with a red one from Font Awesome:
icons.thumbnailAlbum: '<i style="color:#e00;" class="fa fa-search-plus"></i>'
但我正在尝试使用评论图标,如下所示:
icons: { thumbnailCustomTool1 : '<i class="fa fa-comment" aria-hidden="true"></i>'}
或
icons: { thumbnailCustomTool1 : '<i class="fa fa-comment"></i>'}
或
icons: { thumbnailCustomTool1 : '<i class="icon-comment"></i>'}
或
icons: { thumbnailCustomTool1 : '<i class="nGY2Icon icon-comment"></i>'}
并且不起作用:(
但有些图标效果很好..比如..
icons: { thumbnailCustomTool1 : '<i class="nGY2Icon icon-star"></i>'}
更换图标的正确方法是什么?
谢谢大家
nanogallery2 使用自定义字体,基于 font awesome 中的一些图标。
要使用其他图标字体的图标,您是否在 HTML 页面中添加了相应的字体?
字体很棒:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" />
这是 CodePen 上的完整工作示例:https://codepen.io/Kris-B/pen/EWmqdd