有没有办法在 zen 编码中编写数据属性?
我每天都更多地使用数据属性,我真的很怀念在使用 zen 编码时添加数据属性的简单方法。我的意思是我可以添加内联样式(不是我曾经使用过它)
div[style=color:red;]
为什么我不能添加像
div[data-color=pink]
任何解决方法这样的数据属性?
I use data attributes more every day, and I really miss a simple way to add a data attribute while using zen coding. I mean I can add inline style (not that I ever use it)
div[style=color:red;]
why can't I add data attribute like
div[data-color=pink]
Any work arounds?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你可以:
you can:
我使用
div[data-color=pink]
并且它有效。div[data-color="pink"]
和div[data-color='pink']
都没有。I use
div[data-color=pink]
and it works.Both
div[data-color="pink"]
anddiv[data-color='pink']
don't.