hiCasper

Truth or happiness,
never both.

一个简易的友链样式


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>

样式详见 友链页面

本原创文章未经允许不得转载 | 当前页面:hiCasper » 一个简易的友链样式

评论 2

  1. 能不能让后台编辑文章的工具栏显示双行或更多

    瓜皮笔记 2018-11-12    回复
  2. 不错

    726475866 2018-09-21    回复