【问题标题】:Putting 2 images in option of drop-down [duplicate]将2张图片放在下拉选项中[重复]
【发布时间】:2013-08-13 20:04:00
【问题描述】:

我试图将 2 张图片放在下拉框的选项标签中。 一张图片适用于背景图片属性。 所以我尝试了以下代码,但它不起作用。 做这个的最好方式是什么?

<select>
    <option>
       <img src="fist.jpg" height="10" width="10"/>
       <img src="second.jpg" height="10" width="10"/>
    </option>
</select>

【问题讨论】:

    标签: jquery html css


    【解决方案1】:

    You can't put images in an option tag.

    根据您要执行的操作,您可以在 CSS3 中使用多个背景图像。

    background-image: url(first.jpg), url(second.jpg); 
    

    【讨论】:

      猜你喜欢
      • 2021-03-28
      • 1970-01-01
      • 2021-12-01
      • 2023-03-07
      • 2019-08-19
      • 2017-10-19
      • 1970-01-01
      • 2017-10-12
      • 2013-08-16
      相关资源
      最近更新 更多