一个div布局实现潜艇效果代码

代码语言:html

所属分类:布局界面

代码描述:一个div布局实现潜艇效果代码

代码标签: 实现 潜艇 效果

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


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

<head>

  <meta charset="UTF-8">
  

  
<style>
body {
  min-height: 220px;
  height: 100vh;
  position: relative;
  background-color: #395f60;
}
div {
  position: absolute;
  left: 50%;
  top: 50%;
}
div:before,
div:after {
  display: block;
  content: '';
  position: absolute;
}
@media (max-width: 400px) {
  div:not(.no-scale) {
    -webkit-transform: scale(0.8);
            transform: scale(0.8);
  }
}
#deep {
  font-size: 10px;
  width: 25em;
  height: 9em;
  margin-left: -13.7em;
  margin-top: -4.5em;
  background-color: #f0e68c;
  background-repeat: no-repeat;
  background-image: radial-gradient(circle, #555 44%, #999 45%, #999 64%, transparent 65%), radial-gradient(circle, #555 44%, #999 45%, #999 64%, transparent 65%), radial-gradient(ellipse, #555 60%, transparent 61%), radial-gradient(ellipse, #999 60%, transparent 61%), radial-gradient(ellipse, #555 60%, transparent 61%), radial-gradient(ellipse, #555 60%, transparent 61%), radial-gradient(ellipse, #999 60%, transparent 61%), radial-gradient(ellipse, #999 60%, transparent 61%), radial-gradient(ellipse, #999 60%, transparent 61%), radial-gradient(ellipse, #555 60%, transparent 61%), linear-gradient(#ebc975, #ebc975), linear-gradient(#ebc975, #ebc975), linear-gradient(#ebc975, #ebc975), linear-gradient(#ebc975, #ebc975), linear-gradient(to top, #daa520, #f0e68c), linear-gradient(160deg, #daa520 50%, #f0e68c 65%);
  background-size: 3em 3em, 3em 3em, 0.9em 0.4em, 0.9em 0.4em, 0.9em 0.4em, 0.9em 0.4em, 0.9em 0.4em, 0.9em 0.4em, 0.9em 0.4em, 0.9em 0.4em, 0.1em 100%, 0.1em 100%, 0.1em 100%, 0.1em 100%, 100% 20%, 7em 2em;
  background-position: 22.5% 23%, 48% 23%, 17% 45%, 58% 45%, 75% 45%, 90% 45%, 17% 80%, 58% 80%, 75% 80%, 90% 80%, 13% 0, 37% 0, 65% 0, 85% 0, 50% 50%, 0 78%;
  border-radius: 4em/3em;
  border-top-right-radius: 15em 4em;
  box-shadow: inset -2em 0 1em #daa520, inset 2em 0 1em #daa520, 2em 0.1em 0.6em -1.5em #c4941d, 6em 0.5em 0 -2em #daa520;
}
@media (max-width: 400px) {
  #deep {
    -webkit-transform: scale(0.73);
            transform: scale(0.73);
    margin-left: -13.2em;
  }
}
#deep:before {
  width: 20em;
  height: 2em;
  left: 2.2em;
  bottom: -2.5em;
  background-color: #f0e68c;
  background-repeat: no-repeat;
  background-image: -webkit-gradient(linear, left top, right top, from(#c4941d), to(rgba(218,165,32,0))), -webkit-gradient(linear, left top, right top, from(#c4941d), to(rgba(218,165,32,0))), -webkit-gradient(linear, left top, left bottom, color-stop(40%, #f0e68c), color-stop(80%, #daa520));
  background-image: linear-gradient(to right, #c4941d, rgba(218,165,32,0)), linear-gradient(to right, #c4941d, rgba(218,165,32,0)), linear-gradient(to bottom, #f0e68c 40%,.........完整代码请登录后点击上方下载按钮下载查看

网友评论0