【问题标题】:Include images in <option> (For a <select>) html form [duplicate]在<option>(对于<select>)html表单中包含图像[重复]
【发布时间】:2011-05-06 05:18:13
【问题描述】:

可能重复:
Adding images with option tag

是否可以(而不是文本值)将图像存储在 html 表单的部分内?

【问题讨论】:

  • 请不要在您的问题主题中包含[HTML HELP]。使用标记系统。

标签: html css


【解决方案1】:

如果您所说的商店是指显示在下拉列表中的项目旁边,是的,这可能需要一些摆弄。

类似的东西呢?

http://www.marghoobsuleman.com/jquery-image-dropdown

http://www.queness.com/post/204/25-jquery-plugins-that-enhance-and-beautify-html-form-elements#9

你可能需要 jQuery。

【讨论】:

    【解决方案2】:

    不,html select 元素只能采用文本选项,使用 option 标记。

    如果您想使用图像,则必须使用样式化的 ul(或其他)元素。

    【讨论】:

      猜你喜欢
      • 2017-01-29
      • 2021-08-27
      • 1970-01-01
      • 2019-12-04
      • 1970-01-01
      • 1970-01-01
      • 2017-11-01
      • 1970-01-01
      • 2020-03-10
      相关资源
      最近更新 更多