Simon Willison 发布 select 元素跨浏览器样式对照页
Select Styling Specimens
Willison 让 Claude Fable 5.2 写了个 select 样式对照页,还顺手贴出一段开箱即用的 CSS,去掉了 Chrome 里丑丑的原生下拉框。做前端的可以直接抄,比翻 MDN 文档快多了。
Simon Willison 用 Claude Fable 5.2 生成了一页 HTML,汇总 <select> 下拉框所有可用的样式方案,便于在各桌面与移动浏览器截图对比。
起因是原生 select 在不同浏览器渲染差异明显,Chrome 默认样式尤其难看。他实验后给出自己最满意的 CSS:设置 appearance: none 去掉原生外观,配合 0.
5em 2.25em 0.
5em 0.75em 的 padding、6px 圆角和 #c4cbd3 边框,并内联一个 SVG data URI 箭头置于右侧。
同一套样式在三大浏览器中呈现效果一致,开发者可直接复制这段代码替换默认样式。
Select Styling Specimens
Tool: Select Styling Specimens I got frustrated at how HTML <select> boxes default to looking different in different browsers, and are (I think) quite ugly in Chrome: So I had Claude Fable 5.2 build me this page showing all of the ways they can be styled: Build an HTML page that shows all of the ways a select box can be styled, I plan to take screenshots in every desktop and mobile browser After some experimentation I've decided my favorite CSS for select boxes is this: select { appearance : none ; color : # 1f2933 ; padding : 0.5 em 2.25 em 0.5 em 0.75 em ; border : 1 px solid # c4cbd3 ; border-radius : 6 px ; background : # fff url ( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23667085' stroke-width='1.5'/%3E%3C/svg%3E" ) no-repeat right 0.75 em center / 0.75 em ; } Here's what that looks like in the three browsers: Tags: tools , css , html
This report is categorized under AITOP's "How-to" desk, focusing on US frontier AI labs and Silicon Valley technology leaders. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows and US-China foundation model benchmarks and commercialization comparison. Key entities and technical topics under continuous tracking include CSS, HTML, select, Claude.
Source attribution: curated from Simon Willison’s Weblog.