node.js - 如何在节点中使用国家标志并做出反应
问题描述
我正在研究https://github.com/hjnilsson/country-flags
基本上指令说的只是npm install --save svg-country-flags
我做了,但我不确定如何在反应中显示正确的标志甚至标记或渲染方法的大小。
文档甚至提供了这个:http ://hjnilsson.github.io/country-flags/
通常有某种类似的 HTML/CSS <span className="icon au"></span>
,但没有进一步的文档。任何想法?
解决方案
您可以尝试来自 IP2Location 的IP2Location ™ Country Flags,其中包含符合 ISO3166 标准的全球 249 个国家/地区的国旗图像。
通过链接到 ip2location-image-sprite.css,可以使用以下代码轻松调用国旗图像:
<i class="ip2location-flag-16 flag-au"></i> //for au flag in 16px
<i class="ip2location-flag-32 flag-us"></i> //for us flag in 32px
推荐阅读
- datatables - 更改长度未显示在数据表中
- go - 如何仅卸载一种特定的 Go 语言版本(Arch Linux)?
- c# - 将 C# 中的超链接值粘贴到 Access
- python - 'TypeError:str 对象不能被解释为整数'我做错了什么?
- ansible - CentOS/Ansible - 如何修复错误“_ssl.c:602:握手操作超时”
- c# - WPF ListBox 不显示任何内容
- macos - Python3.7:没有命名模块
- python - 如何用字典附加空列的行?
- python - 如何计算两列之间的重叠率并绘制数据透视表以绘制热图(Python)?
- c# - 如何解决 API 调用时 xamarin 表单中的“请求过多”问题?