^ Back to top

xiu主题添加左边侧边栏

只需要在css中添加下面代码:

.speedbar-wrap{position: relative;float: left;margin-left: -99%;width: 158px;overflow: hidden;}
.speedbar{position: fixed;width: 158px;}
.speedbar-menu{ border: 1px solid #eaeaea;font-weight: bold;margin: 0;list-style: none;padding: 0;border-radius: 4px;padding: 7px 0;}
.speedbar-menu a{display: block;padding: 7px 20px; }
.speedbar-menu li:first-child a{border-radius: 4px 4px 0 0}
.speedbar-menu li:last-child a{border-radius: 0 0 4px 4px;border-bottom: none;}

.speedbar-weixin{border-radius: 4px;border: 1px solid #eaeaea;margin-top: 10px;}
.speedbar-weixin h5{padding: 12px 0 0 20px;font-size: 12px;margin: 0;line-height: 16px;}
.speedbar-weixin img{max-width: 100%;}

然后在sidebar中添加下面代码:

<aside class="speedbar-wrap">
	<div class="speedbar">
	<ul class="speedbar-menu">
		<li><a target="_blank" href="http://www.dedewp.com/pay">有偿服务</a></li>
		<li><a target="_blank" href="http://www.dedewp.com/online-music">音乐电台</a></li>
		<li><a target="_blank" href="http://www.dedewp.com/flinks">友情链接</a></li>
		<li><a href="http://www.dedewp.com/dede">dede</a></li>
		<li><a href="http://www.dedewp.com/tag/wordpress">wordpress</a></li>
		<li><a href="http://www.dedewp.com/tag/css">css</a></li>
		<li><a href="http://www.dedewp.com/tag/js">js</a></li>
	</ul>
	<div class="speedbar-weixin">
		<h5>微信关注“陌小雨”<br>每天分享有趣的事儿</h5>
		<img src="http://pic.dedewp.com/wp-content/uploads/mxyblog.jpg" alt="">
	</div>
	</div>
</aside>

添加完毕后可能会出现手机上浏览等一些需进一步调节的css问题,自行调节,陌小雨不会就不鼓捣了,做个笔记吧,有空再折腾,再给大家来一张效果图:
20150215233835

陌陌评论 16

评论前必须登录!

登陆 注册
  1. 灰常记忆
    :???: 还是没折腾够啊
  2. KYAFFO
    加上侧边,果真好看了许多
12