php - how to get all values if ID tags from SVG sprite into php array
问题描述
I have svg sprite inserted in html before tag with many svg icons. Each icon inside separate symbol tag.
<symbol id='arrow-right-long' viewBox='0 0 512 512'>
<path .... />
</symbol>
<symbol id='bars' viewBox='0 0 512 512'>
<path .... />
</symbol>
Then I output on the page like that
<svg>
<use xlink:href="#bars"></use>
</svg>
But I want to have one page where I can see all my icons for reference. How to parse svg file and get all values from id tags into php array?
解决方案
推荐阅读
- ios - Swift Ui 中的导航视图
- azure - 将文件放入 Sharepoint 文件夹时如何触发 Azure Logic App
- javascript - 总结文本并将所有字母粘在一起
- python - 使用 Altair 的极地栏
- reactjs - 对 Springboot 端点的反应在本地工作,但在相同的设置被 dockerized 时不起作用
- python - Python:动画 Matplotlib 错误'缺少 1 个必需的位置参数:'curr'
- reactjs - 无法在 netlify 上部署 gatsby wordpress 站点
- python - discord.py 中斜杠命令的事件监听器
- google-apps-script - 通过谷歌脚本在谷歌表格中插入数据时处理时间长
- excel - Excel VBA - 使范围不可选择