调整webkit中的中文

Adjust Chinese in webkit

我写了一个flexbox css风格的appbar,但是在webkit上中文版的布局有点怪

高亮绿色背景色的地方是flexbox div.

.green-background-color-div`
  display: flex;
  flex: 1;
  flex-direction: row;
  align-items: center;
  background-color: green;
`;

而文本是一个textField的占位符,这个textField的css。

.textField`
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;

  caret-color: gray;
  font-size: 18px;

  border: none;
  outline: none;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  background-color: transparent;

  -webkit-appearance: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  -webkit-tap-highlight-color: transparent;
  &::-webkit-search-cancel-button {
    display: none;
  }
`;

普通文字没有问题

我应该如何调整我的代码以像 Chrome 中那样将中文居中?

使用行高 In CSS

.textField{
     line-height:26px; 
}

26px 是一个假设。你可以根据你的设计增加。