是否有调试图标的 CSS 实体?

发布于 2025-01-12 18:19:25 字数 181 浏览 2 评论 0原文

这有可能可用吗?每次我搜索此类内容时,所有结果都只是关于调试 css。

输入图片此处描述

Any chance this is available? Every time I search for something of the sort, all of the results are just about debugging css.

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

玩套路吗 2025-01-19 18:19:25

没有像您所包含的图像那样的 CSS 实体。正如其他人评论的那样,既然您拥有图像,您可以通过 content 将其包含在 CSS 中。另一种方法是对其进行 Base 64 编码并将其添加为背景图像。

.bug {
  display: inline-block;
  height: 1rem;
  width: 1rem;
  background: transparent url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgZGF0YS1uYW1lPSJNYXRlcmlhbCBFeHBhbmQiIGlkPSJNYXRlcmlhbF9FeHBhbmQiIHZpZXdCb3g9IjAgMCA2NCA2NCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNi4xODgsNTIuMTczQTIsMiwwLDAsMCw1LDU0djhIOVY1NS4zbDYuOTkyLTMuMTA4YTE3Ljk2OCwxNy45NjgsMCwwLDAsMzIuMDE2LDBMNTUsNTUuM1Y2Mmg0VjU0YTIsMiwwLDAsMC0xLjE4OC0xLjgyN2wtOC4zOS0zLjcyOWExNy44NTgsMTcuODU4LDAsMCwwLC41MTEtMy4xMTVsNy44NzktMy41QTIsMiwwLDAsMCw1OSw0MFYzMkg1NXY2LjdsLTUsMi4yMjNWMzAuM2w3LjgxMi0zLjQ3MkEyLDIsMCwwLDAsNTksMjVWMTdINTV2Ni43bC01LjMyNSwyLjM2N0E2LjAwNiw2LjAwNiwwLDAsMCw0NCwyMkg0MlYxOGE3Ljk0MSw3Ljk0MSwwLDAsMC0uOTktMy44NDdsMy4yMzktMi41OTFBMiwyLDAsMCwwLDQ1LDEwVjVINDFWOS4wMzlsLTIuNzQ3LDIuMkE3LjkzOSw3LjkzOSwwLDAsMCwzNCwxMEgzMGE3LjkzOSw3LjkzOSwwLDAsMC00LjI1MywxLjIzN0wyMyw5LjAzOVY1SDE5djVhMiwyLDAsMCwwLC43NTEsMS41NjJsMy4yMzksMi41OTFBNy45NDEsNy45NDEsMCwwLDAsMjIsMTh2NEgyMGE2LjAwNiw2LjAwNiwwLDAsMC01LjY3NSw0LjA2N0w5LDIzLjdWMTdINXY4YTIsMiwwLDAsMCwxLjE4OCwxLjgyN0wxNCwzMC4zVjQwLjkyM0w5LDM4LjdWMzJINXY4YTIsMiwwLDAsMCwxLjE4OCwxLjgyN2w3Ljg3OSwzLjVhMTcuODU4LDE3Ljg1OCwwLDAsMCwuNTExLDMuMTE1Wk0xOCw0NFYzNEgzMFY1Ny44NEExNC4wMDksMTQuMDA5LDAsMCwxLDE4LDQ0Wk0zNCw1Ny44NFYzNEg0NlY0NEExNC4wMDksMTQuMDA5LDAsMCwxLDM0LDU3Ljg0Wk0yNiwxOGE0LDQsMCwwLDEsNC00aDRhNCw0LDAsMCwxLDQsNHY0SDI2Wm0tNiw4SDQ0YTIsMiwwLDAsMSwyLDJ2MkgxOFYyOEEyLDIsMCwwLDEsMjAsMjZaIi8+PC9zdmc+") no-repeat center center;
}
<p>It looks like you have a <span class="bug" aria-label="bug icon"></span>! Do something about it.</p>

There is no CSS entity like the image you've included. As others have commented, since you have the image, you can include it in your CSS via content. Another way is to base 64 encode it and add it as a background image.

.bug {
  display: inline-block;
  height: 1rem;
  width: 1rem;
  background: transparent url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgZGF0YS1uYW1lPSJNYXRlcmlhbCBFeHBhbmQiIGlkPSJNYXRlcmlhbF9FeHBhbmQiIHZpZXdCb3g9IjAgMCA2NCA2NCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzI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CwwLDEsNC00aDRhNCw0LDAsMCwxLDQsNHY0SDI2Wm0tNiw4SDQ0YTIsMiwwLDAsMSwyLDJ2MkgxOFYyOEEyLDIsMCwwLDEsMjAsMjZaIi8+PC9zdmc+") no-repeat center center;
}
<p>It looks like you have a <span class="bug" aria-label="bug icon"></span>! Do something about it.</p>

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文