关于友链页面
上图为友情页面样式,以下为代码部分: PHP参考:
$bookmarks = get_bookmarks();
if ( !emptyempty($bookmarks) ){
echo ‘<ul class=“link-content clearfix”>‘;
foreach ($bookmarks as $bookmark) {
echo ‘
- link\_url . '" title="' . $bookmark->link\_description . '" target="\_blank" >‘. get_avatar($bookmark->link_notes,64) . ‘<span class=“sitename”>‘. $bookmark->link_name .’ ‘;
}
echo ‘‘;
}
?>
<?php
// If comments are open or we have at least one comment, load up the comment template
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
?>
CSS参考:
<code lang=”php”>.link-content li{float:left;text-align: center;width: 100px;font-size:12px;margin-bottom:10px}.link-content li img{border-radius:100%;margin-bottom:5px;transition:0.5s;-webkit-transtion:0.5s} .link-content li span{display:block} .link-content li:hover img{transform:rotate(360deg);-webkit-transform:rotate(360deg);}