select 样式样本集
我对 HTML 选择框在不同浏览器中默认外观各异感到很不满,而且(我认为)它们在 Chrome 里相当丑:
于是我让 Claude Fable 5.2 给我做了这个页面,展示它们所有可以设置样式的方式:
构建一个 HTML 页面,展示 select 框所有可以设置样式的方式,我打算在每个桌面端和移动端浏览器里截图
经过一番尝试,我决定我最喜欢的 select 框 CSS 是这样的:
select{appearance: none;color:#1f2933;padding:0.5em2.25em0.5em0.75em;border:1px solid #c4cbd3;border-radius:6px;background:#fffurl("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.75em center /0.75em;}
这是它在三个浏览器里的样子:
发布于 2026 年 11 月 22 日下午 7:45
这是 Simon Willison 发布的一则内容,发布于 2026 年 11 月 22 日。
每月赞助我 10 美元,即可收到一份精选邮件摘要,汇总当月最重要的 LLM 进展。
付钱给我,让我少给你发点东西!
译文由英文原文机器翻译,术语按行业惯例统一,可在文末展开原文核对。
查看英文原文(Select Styling Specimens)
I got frustrated at how HTML 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.5em2.25em0.5em0.75em;border:1px solid #c4cbd3;border-radius:6px;background:#fffurl("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.75em center /0.75em;}
Here's what that looks like in the three browsers:
Posted 22nd November 2026 at 7:45 pm
This is a beat by Simon Willison, posted on 22nd November 2026.
Sponsor me for $10/month and get a curated email digest of the month's most important LLM developments.
Pay me to send you less!
原文为英文,正文由自动抓取并保留原文。
原文发布于 Simon Willison(Select Styling Specimens),标题、摘要与正文由机器翻译,术语按行业惯例统一,未经人工逐句校订。