css布局实现一个杂志封面效果代码

代码语言:html

所属分类:布局界面

代码描述:css布局实现一个杂志封面效果代码

代码标签: 一个 杂志 封面 效果

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


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

<head>

  <meta charset="UTF-8">

  
  
  
<style>
@import url("https://fonts.googleapis.com/css2?family=Anton&display=swap");
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  height: 100vh;
  background: crimson;
  font-family: "Anton", sans-serif;
  overflow: hidden;
}
body .images {
  width: 80vw;
  height: 80vh;
  left: 0;
  right: 0;
  top: 50%;
  transform: translatey(-50%);
  position: absolute;
  margin: auto;
  box-shadow: 0 20px 20px -5px black;
}
body .images_magazine {
  float: right;
}
body .images_magazine:nth-of-type(1) {
  left: 0;
}
body .images_magazine:nth-of-type(1) .images_magazine__in {
  background: url("//repo.bfw.wiki/bfwrepo/image/5e0c6f2cae508.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_300,h_500,/quality,q_90") no-repeat;
  background-size: 380px !important;
  background-position: center;
}
body .images_magazine:nth-of-type(1) .images_magazine__in h4 {
  -webkit-text-fill-color: black;
  -webkit-text-stroke-color: red;
  -webkit-text-stroke-width: 3px;
  font-size: 50px;
  margin: 0;
  border-top: 5px solid white;
  border-bottom: 5px solid white;
  padding: 20px 20px 20px;
}
body .images_magazine:nth-of-type(2) .images_magazine__in {
  background: url("//repo.bfw.wiki/bfwrepo/image/5d653ba895333.png") no-repeat;
  background-size: 380px !important;
  background-position: center;
}
body .images_magazine:nth-of-type(2) .images_magazine_.........完整代码请登录后点击上方下载按钮下载查看

网友评论0