css布局实现可爱马铃薯土豆效果代码

代码语言:html

所属分类:布局界面

代码描述:css布局实现可爱马铃薯土豆效果代码

代码标签: 可爱 马铃薯 土豆 效果

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


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

<head>

  <meta charset="UTF-8">

  
  
  
<style>
html {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: #c7cabd;
}

body {
  position: relative;
  margin: 0;
  height: 250px;
  width: 250px;
}

.potato {
  position: absolute;
  background: #e8a64f;
  border-radius: 62% 50% 63% 50%/80% 67% 48% 28%;
  height: 250px;
  width: 190px;
  box-shadow: inset 0 0 50px #91540c;
  transform: rotate(40deg);
}

.shadow {
  content: "";
  position: absolute;
  border-radius: 62% 54% 60% 50%/80% 67% 48% 38%;
  height: 250px;
  width: 190px;
  background: rgba(0, 0, 0, 0.1);
  bottom: -30px;
  right: 50px;
  transform: rotate(40deg);
}

.details--1 {
  opacity: 0.5;
  position: absolute;
  top: 160px;
  right: 40px;
  width: 20px;
  height: 40px;
  background: #91540c;
  border-radius: 62% 50% 63% 50%/80% 67% 48% 28%;
  transform: rotate(20deg);
}
.details--1::after {
  opacity: 0.5;
  content: "";
  position: absolute;
  top: 60px;
  right: 40px;
  width: 20px;
  height: 16px;
  background: #91540c;
  border-radius: 62% 50% 63% 50%/80% 67% 48% 28%;
  transform: rotate(20deg);
}
.details--1::before {
  content: "";
  position: absolute;
  top: -60px;
  right: 30px;
  width: 26px;
  height: 16px;
  background: #91540c;
  border-radius: 62% 50% 63% 50%/80% 67% 48% 28%;
  transform: rotate(20deg);
}

.details--2 {
  opacity: 0.5;
  position: .........完整代码请登录后点击上方下载按钮下载查看

网友评论0