css封面悬浮动画效果代码

代码语言:html

所属分类:悬停

代码描述:css封面悬浮动画效果代码

代码标签: css 悬浮 封面 动画

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


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

<head>

  <meta charset="UTF-8">
  

  
  
  
  
<style>
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500;700&display=swap');



* {
  box-sizing: border-box;
}

body {
  background: #232323;
  margin: 0;
  padding: 0;
  display: grid;
  min-height: 100vh;
  align-content: center;
}

.cover {
  display: grid;
  align-content: center;
  font-size: 2vmin;
  background: #e9e7d5;
  margin: 5vmin auto;
  width: 90vmin;
  height: 90vmin;
  color: #312f32;
  border: 1px solid;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 1vmin 2.5vmin 1vmin rgba(0,0,0,0.5);
}

.cover main {
  font-family: 'idkhow', 'Sequel Sans', sans-serif;
}

.cover h1 {
  display: grid;
  grid-template-columns: 33.33% 33.33% 33.33%;
  text-align: center;
  font-size: 8vmin;
  width: 30vmin;
  margin: 0 auto;
  line-height: 1.65em;
  cursor: default;
}

.cover h1 b {
  font-weight: bold;
  transition: all 0.3s ease;
}

.cover h1 b:hover {
  text-shadow: 0.05em 0.05em 0 #ffd630,
    0.1em 0.1em 0 #f5812b,
    0.15em 0.15em 0 #ee2f2b,
    0.2em 0.2em 0 #312f32;
  transform: translate(-0.2em, -0.2em)
}

.cover h1 em {
  display: block;
  font-style: normal;
  width: max-content;
  font-weight: 500;
  font-size: 0.325em;
  letter-spacing: 0.35em;
  line-height: 3.75em;
  position: relative;
  grid-column: 2 / span 2;
  margin-left: 0.5em;
}

.cover h1 em span {
  height: 50vmin;
  width: 25%;
  display: block;
  float: left;
  transition: all 0.5s ease;
}

.cover h1 em span:hover {
  transform: translatey(100%);
}

.cover h1 i {
  position: absolute;
  top: 60%;
  width: 92%;
  display: block;
  transform: skewx(-28deg);
  right: 89%;
}

.cover aside {
  position: absolute;
  right: 0;
  top: 7%;
}

.cover aside ul {
  margin: 1vmin 0;
  padding: 0;
  list-style: none;
  z-index: 2;
}

.cover aside ul li {
  width: 1vmin;
  height: 2vmin;
  border: 0.25vmin solid;
  border-right: none;
  margin-bottom: -0.25vmin;
  position: relative;
}

.cover aside ul li::before {
  content: ":";
  font-weight: bold;
  position: absolute;
  top: 0;
  left: 0;
  text-align: right;
  width: 0.85vmin;
  height: 2vmin;
  line-height: 1.5vmin;
  font-size: 0.75em;
}

.cover aside ul li:first-of-type::before {
  content: "·";
}

.cover aside p {
  font-family: 'Roboto Mono', monospace;;
  position: absolute;
  right: 1.75vmin;
  top: 1vmin;
  writing-mode: vertical-lr;
  transform: rotate(180deg);
  font-size: 0.55em;
  font-weight: 500;
  margin: 0;
}

.cover-logo {
  position: absol.........完整代码请登录后点击上方下载按钮下载查看

网友评论0