自定义 HTML 选择创建
我开始使用 Bootstrap from Twitter 并需要将 HTML Select 添加到我的文档中。 我在这个演示中发现了 HTML Select 的一个很好的实现 http://rails -admin-tb.herokuapp.com/admin/drafts/new 并希望创建类似的东西。
您是否知道我是否已经可以包含一个 UI 元素来获得相同的外观和行为? 如果没有,我怎样才能创建类似的东西?
所有该网站都有一个很棒的外观,我希望有人能给我一些关于如何实现这样的外观和感觉的提示。
I'm starting to use Bootstrap from Twitter and needed to add an HTML Select to my document.
I've found a great implementation of a HTML Select in this Demo http://rails-admin-tb.herokuapp.com/admin/drafts/new and was looking to create something similar.
Do you know if there is already an UI element that I can include to get the same look and behavior?
If not, how can I create something similar?
All that site has a great look, and I was hoping if someone could give me some hints on how to achieve a look and feel like that.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
目前还没有 HTML 元素可以本地执行此操作,必须使用 javascript 来完成。
尝试“选择”:http://harvesthq.github.com/chosen/
There's no HTML element that can do this natively (yet), it must be done with javascript.
Try "Chosen": http://harvesthq.github.com/chosen/
还有 jQuery UI,它非常棒,而且非常全面,具有不同的外观和样式,请在他们的 主页 上查看。
jQuery 工具箱 非常适合这样的样式,它具有开箱即用的出色效果。
总而言之,jQuery 是一个实现此类功能的出色框架,拥有最大的 js 框架社区,并且可能是 Web 的未来!还有许多其他框架,但如果您想要一个具有效果的良好解决方案,它总是 javascript。
There's jQuery UI, which is great and really comprehensive with great different looks and stylings too, check it out on their homepage.
Great for styles like that is the jQuery Toolbox coming with great effects out of the box.
All in all jQuery is a great framework for achieving stuff like that, has the biggest js-framework community and is probably the future of the web! There are many other frameworks out there too, but it's always javascript if you want a nice solution with effects.
您可以使用 http://silviomoreto.github.com/bootstrap-select/
它维护使用下拉菜单的引导程序的外观。
You can use http://silviomoreto.github.com/bootstrap-select/
it maintains the appearance of the bootstrap using the dropdown menu.
只是为了提供可用选项的更新,最近我还一直在使用 Select2 ,它基于 Chosen,有很多不错的功能。
源代码也可在 https://github.com/ivaynberg/select2 上获取。
Just to give an update on the available options, more recently I've also been using Select2, which is based on Chosen and has a lot of nice features.
The source code is also available on https://github.com/ivaynberg/select2 .