首先,我是阿根廷人,所以请原谅我的英语!
这是我的帮助...
HTML 标记是:
<div id="sidebar_bg">
<ul class="social_bookmarks">
<li class='twitter'>
<a href='http://twitter.com/outtacontext'>Follow us on Twitter</a>
</li>
<li class='facebook'>
<a href='http://facebook.com/chamomileteaparty'>Join our Facebook Group</a>
</li>
<li class='gplus'>
<a href='https://plus.google.com/106461359737856957875/posts'>Join me on Google Plus</a>
</li>
<li class='linkedin'>
<a href='http://linkedin.com/jeffgates'>Add me on Linkedin</a>
</li>
<li class="rss">
<a href="http://www.outtacontext.com/wp2/feed/">RSS</a>
</li>
<li class="flickr">
<a href="http://flickr.com/outtacontext">Flickr</a>
</li>
</ul>
</div>
CSS 样式:
#top #sidebar_bg {
text-align: center; /* This will center EXACTLY on the middle the icons (acording to the #sidebar_bg width on every screen resolution */
}
#top #sidebar_bg .social_bookmarks {
display: inline-block;
z-index: 152;
margin-top: 102px;
}
@media only screen and (max-width: 989px) and (min-width: 768px){
#top #sidebar_bg .social_bookmarks {
margin-top: 65px;
}
}
ALTERNATIVE CSS - 如果你想把它放在右边或左边,并使用媒体查询来确定从一侧的分隔宽度,你可以使用这个:
#top #sidebar_bg {
text-align: *****; /* right or left */
}
#top #sidebar_bg .social_bookmarks {
margin-*****: 40px; /* right or left */
display: inline-block;
z-index: 152;
margin-top: 102px;
}
@media only screen and (max-width: 989px) and (min-width: 768px){
#top #sidebar_bg .social_bookmarks {
margin-*****: 25px; /* right or left */
margin-top: 65px;
}
}