为TwentyEleven主题站点标题添加徽标

要在 21 主题中的站点标题左侧添加徽标,请将以下 CSS 添加到外观 > 自定义 > CSS 编辑器:

#site-title a {
	background: url(http://i2.wp.com/s.w.org/about/images/logos/wordpress-logo-notext-rgb.png?w=50) center left no-repeat;
	padding-left: 60px;
}

将 url() 值更改为媒体库中的图像 URL,并根据需要更新填充值。

此后根据需要更改原标题字体颜色为透明(transparent):

#site-title a {
color: transparent;
font-size: 35px;
font-weight: bold;
line-height: 36px;
text-decoration: none;
}

将悬停的字体颜色更改为与版面颜色一致:

#site-title a:hover {color: #0000; background-color: #0000 }

根据图片徽标的大小和颜色更改标语描述(tagline)字体大小和颜色:

#site-description {
color: #7a7a7a;
font-size: 17px;
margin: 0 270px 3.65625em 0;
}

Source: TwentyEleven Theme: Adding a Logo by Site Title

Rate this post

Related Post

(Visited 24 times, 1 visits today)
Spread the love

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

3 − 3 =