Note: This question is not about making a custom dropdown. It's only about possibilities of styling elements with CSS
How can I style s of a element with cross-browser compatibility? I know many Javascript ways which customize the dropdown to convert into , which I'm not asking about.
如何为
I'm asking what could be possible with CSS only, with compatibility for IE9+, Firefox, and Chrome.
我想问的是,只有CSS,以及IE9+、Firefox和Chrome的兼容性,还有什么可能呢?
I want to style like this or as close as possible.
我想要这样的风格或尽可能接近。
I tried here http://jsfiddle.net/jitendravyas/juwz3/3/, but Chrome doesn't show any styling except font color, while Firefox shows some more. How to get border and padding work in Chrome too?
For IE 11 support, you can use [::-ms-expand][15].
对于IE 11支持,可以使用[::-ms-expand][15]。
select::-ms-expand { /* for IE 11 */
display: none;
}
Old Answer
旧的答案
Unfortunately what you ask is not possible by using pure CSS. However, here is something similar that you can choose as a work around. Check the live code below.
Here is the question that you asked some time ago. How to style a
这是你刚才问的问题。如何在不使用Javascript的情况下使用CSS样式化
#2
4
There is no cross-browser way of styling option elements, certainly not to the extent of your second screenshot. You might be able to make them bold, and set the font-size, but that will be about it...
I've played around with select items before and without overriding the functionality with Javascript, I don't think it's possible in Chrome. Whether you use a plugin or write your own code, CSS only is a no go for Chrome/Safari and as you said, Firefox is better at dealing with it.
在视频传输领域,MP4虽然常见,但在直播场景中直接使用MP4格式存在诸多问题。例如,MP4文件的头部信息(如ftyp、moov)较大,导致初始加载时间较长,影响用户体验。相比之下,HLS(HTTP Live Streaming)协议及其M3U8格式更具优势。HLS通过将视频切分成多个小片段,并生成一个M3U8播放列表文件,实现低延迟和高稳定性。本文详细介绍了如何将TS文件转换为M3U8直播流,包括技术原理和具体操作步骤,帮助读者更好地理解和应用这一技术。 ...
[详细]