css布局实现一个邮票效果代码

代码语言:html

所属分类:布局界面

代码描述:css布局实现一个邮票效果代码

代码标签: 一个 邮票 效果

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


<!DOCTYPE html>
<html lang="en" >

<head>

  <meta charset="UTF-8">

  <link href="https://fonts.googleapis.com/css?family=Special+Elite&display=swap" rel="stylesheet">


  
  
<style>

html {
  box-sizing: border-box;
}

body {
  background-color: #fff;
  height: 100vh;
  font-family: "URWAgendaW01-Light";
  line-height: 1.2;
  font-weight: 100;
  margin: 0;
  overflow: hidden;
  padding: 0;
  width: 100vw;
}

h1,
h2,
h4,
p {
  font-family: "Special Elite", cursive;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

main {
  background-color: #3e5131;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100vw;
  height: 100vh;
}

.stamp {
  border-radius: 4px;
  width: 300px;
  height: 380px;
  position: relative;
  border-radius: 2px;
  background-image: radial-gradient(73% 147%, #eadfdf 59%, #eadfdf 100%), radial-gradient(91% 146%, rgba(255, 255, 255, 0.5) 47%, rgba(0, 0, 0, 0.5) 100%);
  background-blend-mode: screen;
}
.stamp::after, .stamp::before {
  content: "";
  width: 300px;
  position: absolute;
  top: 0;
  left: 0;
  background: radial-gradient(circle, #3e5131 50%, transparent 50%), radial-gradient(circle, #3e5131 50%, transparent 50%);
  background-size: 20px 20px;
}
.stamp::before {
  height: 360px;
  top: 10px;
  background-repeat: repeat-y;
  background-position: -4% 0%, 104.2% 0;
}
.stamp::after {
  width: 280px;
  height: 380px;
  left: 10px;
  background-repeat: repeat-x;
  background-position: 0% -3%, 0% 103%;
}

h1 {
  color: #af8a32;
  font-size: 36px;
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 2;
}
h1 span {
  position: relative;
  align-self: flex-end;
}
h1:nth-of-type(2) {
  font-size: 16px;
  top: unset;
  bottom: 24px;
}

.stamp-deets {
  position: absolute;
  right: 24px;
  color: #af8a32;
  top: 40px;
}

.date {
  color: #af8a32;
  font-size: 18px;
  position: absolute;
  top: 90px;
  right: 9px;
  -ms-writing-mode: tb-lr;
      writing-mode: vertical-lr;
}

.stamp-frame {
  position: absolute;
  top: 0px;
  right: 0;
  left: 0;
  bottom: 0;
  margin: auto;
  width: 250px;
  height: 250px;
  background-color: #3e5131;
  box-shadow: inset 0px 0px 0px 4px #af8a32;
  border-radius: 4px;
}

.wrapper {
  background-color: #567144;
  position: absolute;
  top: 10px;
  left: 10px;
  height: calc(100% - 20px);
  width: calc(100% - 20px);
}
.wrapper h1 {
  display: inline-flex;
  line-height: 1;
  padding: 6px;
  left: 0;
  top: 0;
}

.factory {
  position: absolute;
  left: 0;
  height: 100%;
  overflow: hidden;
  width: 100%;
}

.entrance {
  height: 64px;
  position: absolute;
  z-index: 5;
  bottom: 0px;
  left: 0;
  right: 0;
  margin: auto;
  width: calc(100% - 25px);
  width: 100%;
}
.entrance::after {
  content: "";
  left: -15px;
  bottom: -2px;
  position: absolute;
  width: calc(100% + 30px);
  height: 4px;
}

.wall {
  box-shadow: inset 6px 6px 12px 6px .........完整代码请登录后点击上方下载按钮下载查看

网友评论0