在HTML选择中部分加粗文本 [英] Partially Bold Text in an HTML select

查看:332
本文介绍了在HTML选择中部分加粗文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不确定这是否可能,但我有一个案例,我想在HTML选择标签的选项中加粗部分(而不是全部)文本。

I'm not sure if this is even possible, but I have a case where I'd like to bold part (not all) of the text within an option of an HTML select tag.

我尝试使用b标签,以及强力标签,但没有运气(在Chrome上)。 CSS可能会工作,但是因为它在元素级别工作,我不知道如何去这样。

I tried using b tags, as well as strong tags, with no luck (on Chrome). CSS might work, but since it works at the element level, I'm not sure how to go about it that way.

有什么办法吗? / p>

Is there any way to do this?

推荐答案

否;这是不可能的。

相反,你可以使用Javascript做一个假的下拉列表。

Instead, you can make a fake dropdown list using Javascript.

这篇关于在HTML选择中部分加粗文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆