答案 0 :(得分:3)
使用line-height: 2.5em
:
.zocial span
{
padding: .5em 0 0 0;
line-height: 2.5em;
}
答案 1 :(得分:2)
答案 2 :(得分:1)
a span {
padding: 0;
vertical-align: middle;
}
答案 3 :(得分:0)
从using System.Windows;
using System.Windows.Controls;
namespace ModalTest
{
public partial class MainWindow
{
public MainWindow()
{
InitializeComponent();
var modelessWindowWithNoOwner = new Window { Content = new TextBlock { Text = "modeless window" } };
modelessWindowWithNoOwner.Show();
}
private void buttonShowModalWindow_OnClick(object sender, RoutedEventArgs e)
{
var modalWindowWithOwner = new Window { Owner = this, Content = new TextBlock { Text = "modal window" } };
modalWindowWithOwner.ShowDialog();
}
}
}
移除顶部填充并将其设为span
因此,请将现有规则更改为
vertical-align:middle
更新了演示