用按钮替换ul项目符号 [英] Replace ul bullets with a button
本文介绍了用按钮替换ul项目符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以用按钮替换ul
项目符号?我知道您可以使用CSS更改为图像,但是如果我需要一个实际元素呢?
Is it possible to replace ul
bullets with a button? I know you can change to images with CSS but if I wanted an actual element?
推荐答案
这不是您所要求的,但您可以模仿它:
This isn't possible as you asked, but you could, perhaps, emulate it:
<ul>
<li><button>some button text</button>List-element text.</li>
</ul>
以及以下CSS:
ul, li {
list-style-type: none;
}
li {
padding-left: 0;
margin-left: 0;
}
li button {
margin-right: 2em;
}
这种方法的成功或适用性当然完全取决于您的问题所忽略的用例.更详细地讲,也许这个答案可能会变得更加有用.
The success, or applicability, of this approach does, of course, depend entirely on your use-case which your question omits. With more detail, perhaps this answer can become more useful.
这篇关于用按钮替换ul项目符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文