정보실

웹학교

정보실

css Single div CSS Tesla Cybertruck

본문

https://codepen.io/lynnandtonic/pen/NWWmzjr 


HTML : 


<div id="cybertruck"></div>


CSS : 


body {

  width: 100vw;

  height: 100vh;

  position: relative;

  background-color: black;

  background-image: linear-gradient(to top, #0f1215 35%, black 35%);

}

#cybertruck {

  width: 650px;

  height: 210px;

  position: absolute;

  left: 50%;

  bottom: calc(35% - 30px);

  margin-left: -265px;

  background-repeat: no-repeat;

  background-image: linear-gradient(161deg, transparent 11%, #1d232a 11.5%), linear-gradient(161deg, transparent 50%, #555 50%), linear-gradient(to right, #1d232a, #1d232a), radial-gradient(circle at center, #ff0 8%, #f00 30%, transparent 80%), linear-gradient(to right, transparent, rgba(255,0,0,0.6) 30%, rgba(255,0,0,0.6) 70%, transparent), linear-gradient(to bottom, transparent, rgba(255,0,0,0.6) 30%, rgba(255,0,0,0.6) 70%, transparent), radial-gradient(circle at center bottom, transparent 45%, rgba(255,255,255,0.1) 45%, rgba(255,255,255,0.1) 50%, transparent 50%), linear-gradient(to right, rgba(255,255,255,0.1), rgba(255,255,255,0.1)), linear-gradient(40deg, transparent 40%, rgba(255,255,255,0.1) 41%, rgba(255,255,255,0.1) 44%, transparent 45%), linear-gradient(-40deg, transparent 40%, rgba(255,255,255,0.1) 41%, rgba(255,255,255,0.1) 44%, transparent 45%), linear-gradient(320deg, transparent 40%, rgba(0,0,0,0.7) 41%, rgba(0,0,0,0.7) 44%, transparent 45%), linear-gradient(-320deg, transparent 40%, rgba(0,0,0,0.7) 41%, rgba(0,0,0,0.7) 44%, transparent 45%), radial-gradient(circle, #0f1215 50%, transparent 50%), radial-gradient(circle at center top, rgba(255,255,255,0.1) 50%, transparent 50%), radial-gradient(circle at center top, rgba(0,0,0,0.4) 50%, transparent 50%), radial-gradient(circle at center bottom, rgba(255,255,255,0.1) 50%, transparent 50%), radial-gradient(circle, rgba(0,0,0,0.3) 50%, transparent 50%), radial-gradient(circle, #1d232a 50%, transparent 50%), linear-gradient(70deg, transparent 10%, #4a596b 11%), linear-gradient(-60deg, transparent 10%, #4a596b 11%), linear-gradient(127deg, transparent 40%, rgba(0,0,0,0.2) 50%, #333d49 51%, #333d49 62%, black 63%), linear-gradient(-125deg, transparent 35%, rgba(0,0,0,0.2) 45%, #333d49 46%, #333d49 57%, black 58%), linear-gradient(to right, black, black), radial-gradient(circle at center bottom, transparent 45%, rgba(255,255,255,0.1) 45%, rgba(255,255,255,0.1) 50%, transparent 50%), linear-gradient(to right, rgba(255,255,255,0.1), rgba(255,255,255,0.1)), linear-gradient(40deg, transparent 40%, rgba(255,255,255,0.1) 41%, rgba(255,255,255,0.1) 44%, transparent 45%), linear-gradient(-40deg, transparent 40%, rgba(255,255,255,0.1) 41%, rgba(255,255,255,0.1) 44%, transparent 45%), linear-gradient(320deg, transparent 40%, rgba(0,0,0,0.7) 41%, rgba(0,0,0,0.7) 44%, transparent 45%), linear-gradient(-320deg, transparent 40%, rgba(0,0,0,0.7) 41%, rgba(0,0,0,0.7) 44%, transparent 45%), radial-gradient(circle, #0f1215 50%, transparent 50%), radial-gradient(circle at center top, rgba(255,255,255,0.1) 50%, transparent 50%), radial-gradient(circle at center top, rgba(0,0,0,0.4) 50%, transparent 50%), radial-gradient(circle at center bottom, rgba(255,255,255,0.1) 50%, transparent 50%), radial-gradient(circle, rgba(0,0,0,0.3) 50%, transparent 50%), radial-gradient(circle, #1d232a 50%, transparent 50%), linear-gradient(60deg, transparent 10%, #4a596b 11%), linear-gradient(-60deg, transparent 10%, #4a596b 11%), linear-gradient(127deg, transparent 32%, rgba(0,0,0,0.2) 42%, #333d49 43%, #333d49 53%, black 54%), linear-gradient(-125deg, transparent 22%, rgba(0,0,0,0.2) 32%, #1d232a 33%, #1d232a 43%, black 44%), linear-gradient(to right, black, black), linear-gradient(89deg, transparent 50%, black 51%, black 53%, transparent 54%), linear-gradient(170deg, transparent 50%, black 50%), linear-gradient(100deg, transparent 50%, black 51%, black 52%, transparent 53%), linear-gradient(90deg, transparent 50%, black 51%, black 52%, transparent 53%), linear-gradient(to right, rgba(255,255,255,0.05), rgba(255,255,255,0)), linear-gradient(98deg, transparent 55%, black 56%), linear-gradient(176deg, transparent 32%, #1d232a 33%), linear-gradient(179deg, #1d232a 85%, black 86%), linear-gradient(179deg, transparent 40%, #1d232a 45%, #1d232a 50%, transparent 55%), linear-gradient(105deg, transparent 50%, #1d232a 51%, #1d232a 53%, transparent 54%), linear-gradient(100deg, transparent 50%, #1d232a 51%, #1d232a 53%, transparent 54%), linear-gradient(81deg, transparent 50%, #1d232a 51%, #1d232a 53%, transparent 54%), linear-gradient(81deg, transparent 38%, black 40%, black 49%, #ddd 51%), linear-gradient(to right, rgba(0,0,0,0.3), transparent), linear-gradient(to left, rgba(0,0,0,0.3), transparent), linear-gradient(161deg, black 50%, #ddd 51%, #ddd 55%, transparent 56%), linear-gradient(-174deg, black 33%, #ddd 34%, #ddd 40%, transparent 41%), linear-gradient(to right, #ddd, #ddd), linear-gradient(176deg, transparent 34%, black 35%, black 45%, #ddd 46%, #ddd 60%, transparent 60%), linear-gradient(161deg, black 56%, transparent 57%), linear-gradient(-174deg, black 41%, transparent 42%), linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.05) 31%, rgba(255,255,255,0.05) 40%, rgba(0,0,0,0.6) 41%, rgba(0,0,0,0.6) 45%, rgba(255,255,255,0.1) 46%, rgba(255,255,255,0.1) 55%, transparent 56%), linear-gradient(103deg, transparent 30%, rgba(255,255,255,0.1) 31%, rgba(255,255,255,0.1) 34%, rgba(0,0,0,0.3) 35%, rgba(0,0,0,0.3) 38%, transparent 39%), linear-gradient(93deg, transparent 29%, rgba(0,0,0,0.2) 30%, rgba(0,0,0,0.2) 33%, rgba(255,255,255,0.1) 34%, rgba(255,255,255,0.1) 50%, transparent 51%), linear-gradient(to right, rgba(0,0,0,0.3) 20%, rgba(255,255,255,0.3) 21%), linear-gradient(to top, rgba(255,255,255,0.9) 50%, rgba(255,255,255,0) 65%), linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,0.3) 60%, rgba(255,255,255,0.7));

  background-size: 20px 45px, 5px 5px, 26px 10px, 12px 12px, 55px 1px, 1px 55px, 130px 65px, 10px 7px, 16px 16px, 16px 16px, 16px 16px, 16px 16px, 20px 20px, 24px 12px, 34px 16px, 34px 16px, 90px 90px, 130px 130px, 40px 6px, 40px 6px, 35px 38px, 40px 51px, 78px 60px, 130px 65px, 10px 7px, 16px 16px, 16px 16px, 16px 16px, 16px 16px, 20px 20px, 24px 12px, 34px 16px, 34px 16px, 90px 90px, 130px 130px, 40px 9px, 40px 9px, 60px 58px, 60px 55px, 75px 60px, 30px 80px, 150px 30px, 30px 80px, 30px 95px, 45px 45px, 20px 120px, 600px 87px, 500px 50px, 254px 20px, 30px 30px, 30px 30px, 30px 30px, 25px 22px, 200px 100px, 200px 100px, 230px 80px, 370px 80px, 220px 60px, 550px 50px, 230px 80px, 370px 80px, 30px 80px, 30px 80px, 30px 80px, 10px 80px, 7px 80px, 350px 60px;

  background-position: 5px 80px, 0 125px, 0 128px, right 25px top 35px, right top 40px, right 30px top 15px, 25px 90px, 85px 123px, 68px 130px, 96px 130px, 68px 160px, 96px 160px, 80px 145px, 78px 156px, 73px 156px, 73px 140px, 45px 110px, 25px 90px, 50px 89px, 90px 89px, 20px 89px, 124px 89px, 52px 89px, 435px 90px, 495px 123px, 478px 130px, 506px 130px, 478px 160px, 506px 160px, 490px 145px, 488px 156px, 483px 156px, 483px 140px, 455px 110px, 435px 90px, 460px 78px, 500px 78px, 416px 78px, 512px 78px, 465px 78px, 150px 70px, 500px 115px, 250px 65px, 380px 55px, 25px 80px, right 25px top 15px, 25px 39px, 115px 90px, 165px 145px, 148px 60px, 257px 52px, 380px 42px, 380px 23px, 25px 0, right 25px top 0, 25px 0, right 25px top 0, right 25px top 20px, 50px 29px, 25px 0, right 25px top 0, 170px 30px, 260px 10px, 277px 10px, 382px 10px, 375px 0, 50px 0;

}

#cybertruck:before,

#cybertruck:after {

  display: block;

  content: '';

  position: absolute;

}

#cybertruck:before {

  width: 200px;

  height: 2px;

  left: -175px;

  top: 83px;

  background-image: linear-gradient(to right, rgba(0,255,255,0.2), rgba(0,255,255,0.8) 60%);

  border-top-left-radius: 300px 10px;

  border-bottom-left-radius: 300px 10px;

  box-shadow: -20px 0 10px 2px rgba(0,255,255,0.4), 30px 0 20px 10px rgba(0,255,255,0.2);

}

#cybertruck:after {

  width: 20px;

  height: 7px;

  left: 5px;

  top: 80px;

  background-color: white;

  border-top-left-radius: 50px 30px;

  box-shadow: 0 0 15px 7px rgba(0,255,255,0.8), 0 0 40px 25px rgba(0,255,255,0.5), -75px 0 30px 15px rgba(0,255,255,0.2);

}






  • 트위터로 보내기
  • 페이스북으로 보내기
  • 구글플러스로 보내기
  • 카카오톡으로 보내기

페이지 정보

조회 18회 ]  작성일20-01-09 18:42

웹학교