如何从离子图标中删除垂直填充?

How can I remove vertical padding from ionic icon?

这是我的HTML:

<i class="icon ion-email notify-icon"></i>

和CSS:

.notify-icon {
  color: white;
  font-size: 35px;
  background-color: gray;
  padding: 0;
}

我将内边距设置为 0 并删除了水平内边距,但我仍然在顶部和底部看到 4-5 像素的灰色内边距。我该如何解决?

解法: 据我所知,删除垂直填充是不可能的,所以我决定用图像替换离子图标。

不知道为什么要使用背景色,但如果您想要 35 像素大小的灰色电子邮件图标,请执行此操作。 完整的实现在这里 http://codepen.io/anon/pen/oLABwK

.notify-icon {
  color: gray;
  font-size: 35px;
}

或者,如果您想要带边框的图标,请使用

 <i class="icon ion-ios-email-outline notify-icon2 ">

和CSS

 .notify-icon2 {
  font-size: 35px;
  }
.notify-icon {
 color: white;
 font-size: 35px;
 background-color: gray;
 padding: 0 !important;
}