下载 pill 图标
SVG 矢量源文件,或 PNG 按 16~512 预设与 16~1024 自定义尺寸导出,任意尺寸边缘锐利。
PNG 由矢量源实时渲染,任意尺寸边缘锐利无锯齿;下载与预览均免费,无需注册。
pill 的预览与使用场景
切换预览颜色后,下方三底色、真实界面场景与各尺寸渲染会实时跟随。
在真实界面里长这样
各尺寸下的可读性
复制 pill 图标代码
内联 SVG、React、Vue 与 CSS mask 四种主流引用方式,代码基于当前源文件生成,复制即用。
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12.9948 4.3735C13.8742 3.4941 15.0669 3 16.3106 3C17.5543 3 18.7471 3.4941 19.6265 4.3735C20.5059 5.2529 21 6.4457 21 7.6894C21 8.9331 20.5059 10.1258 19.6265 11.0052L11.0052 19.6265C10.1258 20.5059 8.9331 21 7.6894 21C6.4457 21 5.2529 20.5059 4.3735 19.6265C3.4941 18.7471 3 17.5543 3 16.3106C3 15.0669 3.4941 13.8742 4.3735 12.9948L12.9948 4.3735ZM8.6841 8.6841L15.3159 15.3159"/></svg>export function PillIcon(props: React.SVGProps<SVGSVGElement>) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="1em"
height="1em"
viewBox="0 0 24 24"
fill="currentColor"
{...props}
dangerouslySetInnerHTML={{ __html: `<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12.9948 4.3735C13.8742 3.4941 15.0669 3 16.3106 3C17.5543 3 18.7471 3.4941 19.6265 4.3735C20.5059 5.2529 21 6.4457 21 7.6894C21 8.9331 20.5059 10.1258 19.6265 11.0052L11.0052 19.6265C10.1258 20.5059 8.9331 21 7.6894 21C6.4457 21 5.2529 20.5059 4.3735 19.6265C3.4941 18.7471 3 17.5543 3 16.3106C3 15.0669 3.4941 13.8742 4.3735 12.9948L12.9948 4.3735ZM8.6841 8.6841L15.3159 15.3159"/>` }}
/>
);
}<template>
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" v-html="body"></svg>
</template>
<script setup>
const body = `<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12.9948 4.3735C13.8742 3.4941 15.0669 3 16.3106 3C17.5543 3 18.7471 3.4941 19.6265 4.3735C20.5059 5.2529 21 6.4457 21 7.6894C21 8.9331 20.5059 10.1258 19.6265 11.0052L11.0052 19.6265C10.1258 20.5059 8.9331 21 7.6894 21C6.4457 21 5.2529 20.5059 4.3735 19.6265C3.4941 18.7471 3 17.5543 3 16.3106C3 15.0669 3.4941 13.8742 4.3735 12.9948L12.9948 4.3735ZM8.6841 8.6841L15.3159 15.3159"/>`;
</script>.pill {
width: 1em;
height: 1em;
background-color: currentColor;
-webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%221em%22%20height%3D%221em%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222%22%20d%3D%22M12.9948%204.3735C13.8742%203.4941%2015.0669%203%2016.3106%203C17.5543%203%2018.7471%203.4941%2019.6265%204.3735C20.5059%205.2529%2021%206.4457%2021%207.6894C21%208.9331%2020.5059%2010.1258%2019.6265%2011.0052L11.0052%2019.6265C10.1258%2020.5059%208.9331%2021%207.6894%2021C6.4457%2021%205.2529%2020.5059%204.3735%2019.6265C3.4941%2018.7471%203%2017.5543%203%2016.3106C3%2015.0669%203.4941%2013.8742%204.3735%2012.9948L12.9948%204.3735ZM8.6841%208.6841L15.3159%2015.3159%22%2F%3E%3C%2Fsvg%3E") no-repeat center / contain;
mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%221em%22%20height%3D%221em%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222%22%20d%3D%22M12.9948%204.3735C13.8742%203.4941%2015.0669%203%2016.3106%203C17.5543%203%2018.7471%203.4941%2019.6265%204.3735C20.5059%205.2529%2021%206.4457%2021%207.6894C21%208.9331%2020.5059%2010.1258%2019.6265%2011.0052L11.0052%2019.6265C10.1258%2020.5059%208.9331%2021%207.6894%2021C6.4457%2021%205.2529%2020.5059%204.3735%2019.6265C3.4941%2018.7471%203%2017.5543%203%2016.3106C3%2015.0669%203.4941%2013.8742%204.3735%2012.9948L12.9948%204.3735ZM8.6841%208.6841L15.3159%2015.3159%22%2F%3E%3C%2Fsvg%3E") no-repeat center / contain;
}给 pill 加一点动效
单文件 CSS 即可播放,无需任何依赖;描画动效仅对描边类图标生效。
呼吸
透明度往复渐变,适合状态提示与在线指示。
.icon-pill {
animation: icon-breathe 1.8s ease-in-out infinite;
}
@keyframes icon-breathe {
0%, 100% { opacity: 1; }
50% { opacity: 0.35; }
}旋转
匀速循环旋转,适合加载中场景。
.icon-pill {
animation: icon-spin 1.6s linear infinite;
}
@keyframes icon-spin {
to { transform: rotate(360deg); }
}描画
线条从无到有依次绘出,适合线性图标与首屏引导。
.icon-pill path {
stroke-dasharray: 120;
animation: icon-draw 1.2s ease forwards;
}
@keyframes icon-draw {
from { stroke-dashoffset: 120; }
to { stroke-dashoffset: 0; }
}SVG 健康报告
对源文件的客观技术指标,供工程侧评估引用方式。
文件体积
0.57 KB
581 字节
viewBox
0 0 24 24
矢量坐标系
图元总数
1
<path> ×1
风格
单色轮廓(描边)
描边可随字号加粗
同时含 width/height 与 viewBox:可以只保留 viewBox,让图标跟随容器自适应缩放。 文件体积 0.57 KB(581 字节),图元 1 个,风格为单色轮廓(描边)。
常见问题
关于 pill 图标的下载、商用与改色。
pill 图标是什么?▾
它是 Keyline Icons(keyline-icons)开源图标集中的 pill 图标,单色轮廓(描边),viewBox 为 0 0 24 24,文件仅 0.57 KB,矢量格式可无损缩放到任意尺寸。
如何下载 pill 图标?▾
点击「下载与导出」中的 SVG 源文件按钮保存矢量文件;也可以按 512 / 256 / 128 / 64 / 32 / 16px 预设导出 PNG,或在输入框填 16~1024 之间的任意尺寸。需要 iOS、Android 全套尺寸时,用素材包生成器一键打包。
pill 图标可以商用吗?▾
该图标采用 MIT(MIT) 开源协议,通常允许在遵守协议的前提下免费使用,常见要求是保留作者版权声明。商用前建议阅读协议原文确认。
如何修改 pill 图标的颜色?▾
在「预览与场景」的色板中切换颜色,三底色与全部场景会实时跟随;点击任一相近图标可打开预览弹层,复制对应颜色的 SVG 源码或 PNG。也可以复制 SVG 源码后自行修改 fill 值。