html – 如何将背景图像添加到选择框?

html – 如何将背景图像添加到选择框?,第1张

概述我已经完成了 this question的答案,但到目前为止我还没有在Google Chrome中获得好运. 下面的代码在Firefox中运行得很好但是: select { appearance: none; -moz-appearance: none; -webkit-appearance: none; text-indent: 0.01px; text-overflow: 我已经完成了 this question的答案,但到目前为止我还没有在Google Chrome中获得好运.

下面的代码在firefox中运行得很好但是:

select {  appearance: none;  -moz-appearance: none;  -webkit-appearance: none;  text-indent: 0.01px;  text-overflow: ""; }option {    background: transparent        url(http://www.clinicalflow.com/skins/common/icons/ed_ins_img.png)     no-repeat left center;    padding-left: 20px;      wIDth: 200px;}

任何提示?

Here is the fiddle I have been playing with.

解决方法 应该是这样的:
option {    background: transparent url(http://www.clinicalflow.com/skins/common/icons/ed_ins_img.png) no-repeat left center;    padding-left: 20px;      wIDth: 200px;}

你在背景后使用分号:透明;之后那个网址是错的.

总结

以上是内存溢出为你收集整理的html – 如何将背景图像添加到选择框?全部内容,希望文章能够帮你解决html – 如何将背景图像添加到选择框?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1107854.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-29
下一篇 2022-05-29

发表评论

登录后才能评论

评论列表(0条)

保存