You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Figma设计还原问题:输入框文本过粗与设计不符求助

输入框文本粗细与Figma设计不符的问题

我尝试还原Figma中的输入框设计,但效果不完全准确:

想要创建的输入框效果如下:
目标输入框

注意其中文本的纤细程度,Figma给出的参数如下:

color: var(--heading-black, #222);
/* Button/16/Regular */
font-family: Inter;
font-size: 16px;
font-style: normal;
font-weight: 400;
line-height: 16px;

我使用了相同的颜色和字重,甚至尝试将字重改为100,但实际实现的效果里文本明显更粗:
实际输入框效果

以下是我的输入框CSS代码:

.search-field {
    margin-left: 65px;
    width: 429px;
    height: 44px;   
    font-size: 16px;
    font-weight: 400;
    padding-left: 46px;
    background: url("../../../assets/icons/search.png") no-repeat;
    background-color: white;
    background-size: 21px;
    background-position: 14px center;
    border: none;
    border-radius: 4px;
    outline: none;
    color: #222;
}

以及HTML代码:

<input type="text" class="search-field" value placeholder="Booking.com, Expedia, Otto...">

请问我哪里出错了?


内容的提问来源于stack exchange,提问作者IonicMan

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.15 23:41:15