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 rgba(0, 0, 0, 0.25);
  width: 21%;
  height: calc(100% - 28px);
  position: absolute;
  bottom: 0;
  border-style: solid;
  border-color: #232526;
}
.wall.is-left {
  background: linear-gradient(to bottom, #fdfcfb 0%, #3E5131 100%);
  border-width: 1px 0 0 1px;
}
.wall.is-right {
  background: linear-gradient(to bottom, #fdfcfb 0%, #3E5131 100%);
  right: 0;
  border-width: 1px 1px 0 0;
}

.pillar {
  box-shadow: inset 6px 6px 12px 6px rgba(0, 0, 0, 0.25);
  width: 9%;
  height: calc(100% - 7px);
  position: absolute;
  bottom: 0;
  border: 1px solid #232526;
  border-bottom: 0;
}
.pillar.is-left {
  background: linear-gradient(to bottom, #fdfcfb 0%, #3E5131 100%);
  left: 21%;
}
.pillar.is-right {
  background: linear-gradient(to bottom, #fdfcfb 0%, #3E5131 100%);
  right: 21%;
}

.gate {
  box-shadow: inset 1px 12px 9px -6px rgba(249, 243, 230, 0.95);
  border-radius: 75% 75% 0% 0%/10% 10% 0% 0%;
  width: 41%;
  background: linear-gradient(to right, #232526, #414345);
  height: calc(100% - 14px);
  left: 29.5%;
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  bottom: 0;
  z-index: 2;
}
.gate::after {
  content: "Guinness";
  font-weight: 200;
  color: #fff;
  font-size: 14px;
  bottom: 7px;
  left: 0;
  right: 0;
  margin: auto;
  position: absolute;
  text-align: center;
  opacity: 0.85;
  width: 100%;
}
.gate::before {
  content: "";
  background: linear-gradient(to bottom, #B28B67 5.66%, #232526 94.35%);
  bottom: 0;
  left: -7px;
  right: 0;
  margin: auto;
  position: absolute;
  height: 5px;
  border-radius: 0 0 0 0/4px 4px 4px 4px;
  transform: skewX(-3deg);
  width: calc(100% + 14px);
  border: 1px solid #232526;
}
.gate .gate-logo {
  width: 12px;
  height: 4px;
  position: absolute;
  top: 10px;
}

.bg {
  border: 1px solid #232526;
  border-bottom: 0;
  background: linear-gradient(to bottom, #fdfcfb 0%, #3E5131 100%);
  height: 96px;
  position: absolute;
  z-index: 1;
  bottom: -3px;
  left: 0;
  transform: scale(0.9.........完整代码请登录后点击上方下载按钮下载查看

网友评论0