纯css绘制一个多尺寸的便签效果

代码语言:html

所属分类:布局界面

代码描述:纯css绘制一个多尺寸的便签效果

代码标签: 一个 尺寸 便签 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">

    <link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Short+Stack'>
    <style>
        * {
            margin: 10px;
            padding: 0;
        }
        body {
            background: #4d3a1c;
        }
        .sticker:nth-child(1) {
            width: 290px;
            min-height: 290px;
            background: #f2e79e;
            padding: 6px;
            box-shadow: -4px 5px 1px rgba(0, 0, 0, 0.8);
            position: relative;
            float: left;
            margin-top: 15px;
            font: bold 1em/1.2em "Short Stack", Helvetica, sans-serif;
            font-size: 16px;
        }
        .sticker:nth-child(1):before {
            content: "";
            background: rgba(225, 220, 203, 0.61);
            width: 120px;
            height: 30px;
            display: block;
            position: absolute;
            top: -15px;
            left: 50%;
            margin-left: -60px;
            transform: rotate(1deg);
        }
        .sticker:nth-child(1):nth-child(2n):before {
            transform: rotate(-2deg);
        }
        .sticker:nth-child(1):nth-child(3n):before {
            transform: rotate(10deg);
        }
        .sticker:nth-child(2) {
            width: 140px;
            min-height: 140px;
            background: #f2e79e;
            padding: 3px;
            box-shadow: -4px 5px 1px rgba(0, 0, 0, 0.8);
            position: relative;
            float: left;
            margin-top: 7.5px;
            font: bold 1em/1.2em "Short Stack", Helvetica, sans-serif;
            font-size: 10px;
        }
        .sticker:nth-child(2):before {
            content: "";
            background: rgb.........完整代码请登录后点击上方下载按钮下载查看

网友评论0