CSS样式:
.friends {
display: flex;
flex-wrap: wrap;
}
.friends .a-friend {
display: flex;
margin: 10px 10px 0 0;
text-decoration: none;
font-weight: 300;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
padding: 10px;
transition: box-shadow 0.2s, transform 0.2s;
}
.friends .a-friend:hover {
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.friends .a-friend:active {
transform: scale(0.95);
}
.friends .a-friend .blog-avatar {
background-color: white;
border-radius: 50%;
width: 50px;
height: 50px;
}
.friends .a-friend .text-container {
margin-left: 10px;
}
.friends .a-friend .text-container .name {
font-size: 14px;
}
.friends .a-friend .text-container .description {
font-size: 12px;
margin-top: 5px;
}
HTML代码:
<div class="friends">
<a class="a-friend" target="_blank" style="background-color:white;color:black" href="http://blog.hicasper.com/">
<img class="blog-avatar" src="https://cn.gravatar.com/avatar/b9fa18886cd3acb13fcd8ebfb6140c44?s=200">
<div class="text-container">
<div class="name">hiCasper</div>
<div class="description">This is Description</div>
</div>
</a>
</div>
样式详见 友链页面