xiu主题擦亮logo金字招牌

Author: 陌小雨Date: 2016-10-18View: 82

好的网站logo会让人留下深刻的印象,logo就像是招牌一样,必须得擦亮。之前分享过xiu主题给焦点图添加鼠标悬停一道光滑过特效,同理,我们可以给logo添加一道光滑过。

1、打开functions.xiu.php,按ctrl+F搜索代码:

 echo '<'.$tag.' class="logo"><a href="'.get_bloginfo('url').'" title="'.get_bloginfo('name')._hui('connector').get_bloginfo('description').'">'.get_bloginfo('name').'</a>

在其后添加代码:

<i class="light"></i>

2、添加css样式

.light{
cursor:pointer;
position: absolute;
left: -160px;
top: 0;
width: 160px;
height: 79px;
background-image: -moz-linear-gradient(0deg,rgba(255,255,255,0),rgba(255,255,255,0.5),rgba(255,255,255,0));
background-image: -webkit-linear-gradient(0deg,rgba(255,255,255,0),rgba(255,255,255,0.5),rgba(255,255,255,0));
transform: skewx(-25deg);
-o-transform: skewx(-25deg);
-moz-transform: skewx(-25deg);
-webkit-transform: skewx(-25deg);
}
.logo:hover .light{
left:300px;
-moz-transition:0.5s;
-o-transition:0.5s;
-webkit-transition:0.5s;
transition:0.5s;
}

3、鼠标放上去就可以擦亮金子招牌啦!