찾다
웹 프론트엔드HTML 튜토리얼2014圣诞节一款纯css3实现的雪人动画特效_html/css_WEB-ITnose

在2014年的圣诞节,爱编程小编给大家分分享一款纯css3实现的雪人动画特效。该实例实现一个雪人跳动的特效,效果图如下:

在线预览   源码下载

实现的代码。

html代码:

 <span class="text">lolwut<small>-@rsmswlln</small></span>    <div class="body">        <div class="hat">            <div class="ribbon">            </div>        </div>        <div class="face">        </div>        <div class="scarf">        </div>        <div class="right-arm">            <div class="hand">            </div>        </div>        <div class="left-arm">            <div class="hand">            </div>        </div>    </div>    <div class="puddle">    </div>

css代码:

 body {  background: #c0392b;}.body {  width: 250px;  height: 250px;  background: #ffffff;  border-radius: 50%;  box-shadow: inset -20px -5px 35px rgba(0, 0, 0, 0.2);  position: absolute;  right: 0;  left: 0;  margin: 300px auto;  animation: jump 1s infinite;}.body:before {  z-index: 2;  content: "";  width: 180px;  height: 180px;  background: #ffffff;  border-radius: 50%;  box-shadow: inset -10px -5px 10px rgba(0, 0, 0, 0.2);  position: relative;  display: inline-block;  top: -120px;  left: 25px;}.body:after {  content: "";  width: 140px;  height: 140px;  background: #ffffff;  border-radius: 50%;  box-shadow: inset -10px -5px 10px rgba(0, 0, 0, 0.2);  position: relative;  display: inline-block;  top: -400px;  left: 20px;}.body > .hat {  width: 200px;  height: 15px;  border-radius: 50%;  background-color: #111111;  position: absolute;  z-index: 4;  top: -200px;  left: -15px;}.body > .hat:before {  content: "";  width: 100px;  height: 65px;  background-color: #111111;  display: inline-block;  position: relative;  top: -55px;  left: 51px;}.body > .hat:after {  z-index: 5;  content: "";  display: inline-block;  position: relative;  top: -145px;  left: 51px;  width: 100px;  height: 5px;  border-radius: 50%;  background-color: #2b2b2b;}.body > .hat > .ribbon {  height: 10px;  width: 100px;  background-color: #6d2018;  position: relative;  top: -90px;  left: 51px;  z-index: 6;}.body > .face {  z-index: 3;  width: 12px;  height: 12px;  background-color: #2c3e50;  border-radius: 50%;  position: absolute;  top: -170px;  left: 38px;}.body > .face:before {  content: "";  background-color: transparent;  display: inline-block;  position: relative;  top: 30px;  left: -45px;  transform: rotate(-15deg);  border-top: 12px solid transparent;  border-bottom: 12px solid transparent;  border-right: 40px solid #e67e22;}.body > .face:after {  content: "";  background-color: transparent;  display: inline-block;  position: relative;  top: 0;  left: -46px;  transform: rotate(-15deg);  border-top: 12px solid transparent;  border-right: 40px solid #bf6516;}.body > .scarf {  z-index: 3;  width: 150px;  height: 30px;  background-color: #2980b9;  position: absolute;  top: -110px;  left: 25px;  transform: rotate(-15deg);  border-radius: 20%;}.body > .scarf:after {  content: "";  width: 75px;  height: 30px;  background-color: #2980b9;  display: inline-block;  position: relative;  top: 16px;  left: 80px;  transform: rotate(85deg);  border-radius: 20%;}.body > .left-arm,.body .right-arm {  z-index: 7;  width: 100px;  height: 6px;  background-color: #825a2c;  position: absolute;  top: 10px;  left: -20px;  transform: rotate(-15deg);  animation: rub-right 0.5s infinite;}.body > .left-arm > .hand,.body .right-arm > .hand {  width: 25px;  height: 6px;  background-color: #825a2c;  position: absolute;  top: -32px;  left: -60px;  transform: rotate(75deg);}.body > .left-arm:after,.body .right-arm:after {  content: "";  width: 75px;  height: 6px;  background-color: #a87439;  display: inline-block;  position: relative;  top: -24px;  left: -70px;  transform: rotate(25deg);}.body > .left-arm.left-arm,.body .right-arm.left-arm {  background-color: #a87439;  animation: rub-left 0.5s infinite;  top: -15px;  z-index: 1;}.body > .left-arm.left-arm > .hand,.body .right-arm.left-arm > .hand {  background-color: #a87439;  top: -14px;  transform: rotate(45deg);}.body > .left-arm.left-arm:after,.body .right-arm.left-arm:after {  background-color: #825a2c;  transform: rotate(5deg);  top: -12px;  left: -74px;}.puddle {  z-index: -1;  width: 200px;  height: 100px;  background: #2980b9;  border-radius: 50%;  position: absolute;  right: 0;  left: -50px;  margin: 500px auto;}.puddle:after {  content: "";  width: 120px;  height: 80px;  display: inline-block;  border-radius: 50%;  left: 150px;  position: relative;  background-color: #2980b9;}.text {  text-align: center;  font-family: 'Lobster', cursive;  font-size: 74px;  display: inline-block;  transform: rotate(-15deg);  position: absolute;  margin: 50px 30px;  color: #ffffff;  text-shadow: 3px 3px 2px rgba(0, 0, 0, 0.5);}.text > small {  font-size: 20px;  display: block;}@keyframes rub-left {  0% {    margin-left: 0px;    margin-top: 0;  }  50% {    margin-left: 5px;    margin-top: 1px;  }  100% {    margin-left: 0px;    margin-top: 0;  }}@keyframes rub-right {  0% {    margin-left: 4px;  }  50% {    margin-left: 0px;  }  100% {    margin-left: 4px;  }}@keyframes jump {  0% {    margin: 300px auto;  }  40% {    margin: 250px auto;  }  80% {    margin: 300px auto;  }}

via:http://www.w2bc.com/Article/13508

성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
HTML 문서의 루트 태그는 무엇입니까?HTML 문서의 루트 태그는 무엇입니까?Apr 29, 2025 am 12:10 AM

Theroottaginanhtmldocumentis.itservesasthetop-levellement thatenCapsulateslotherContent, 프로퍼 디코 언어 구조에있는 BrowserParsing을 보장합니다.

HTML 태그와 요소가 같은 것입니까?HTML 태그와 요소가 같은 것입니까?Apr 28, 2025 pm 05:44 PM

이 기사는 HTML 태그가 요소를 정의하는 데 사용되는 구문 마커이고 요소는 태그 및 내용을 포함한 완전한 단위라고 설명합니다. 그들은 웹 페이지를 구조화하기 위해 협력합니다. character count : 159

& lt; head & gt의 중요성은 무엇입니까? & lt; Body & Gt; html에서 태그?& lt; head & gt의 중요성은 무엇입니까? & lt; Body & Gt; html에서 태그?Apr 28, 2025 pm 05:43 PM

이 기사는 & lt; Head & gt의 역할에 대해 설명합니다. & lt; Body & Gt; HTML의 태그, 사용자 경험에 미치는 영향 및 SEO 영향. 적절한 구조화는 웹 사이트 기능 및 검색 엔진 최적화를 향상시킵니다.

& lt; strong & gt;, & lt; b & gt; 태그 및 & lt; em & gt;, & lt; i & gt; 태그?& lt; strong & gt;, & lt; b & gt; 태그 및 & lt; em & gt;, & lt; i & gt; 태그?Apr 28, 2025 pm 05:42 PM

이 기사는 HTML 태그, 등의 차이점과 시맨틱 대 프리젠 테이션 사용 및 SEO 및 접근성에 미치는 영향에 중점을 둡니다.

HTML의 문서에서 사용중인 문자 세트를 표시하는 방법을 설명해 주시겠습니까?HTML의 문서에서 사용중인 문자 세트를 표시하는 방법을 설명해 주시겠습니까?Apr 28, 2025 pm 05:41 PM

기사는 UTF-8에 중점을 둔 HTML에서 문자 인코딩 지정에 대해 논의합니다. 주요 이슈 : 올바른 텍스트 표시 보장, 멍청한 문자 방지 및 SEO 및 접근성 향상.

HTML의 다양한 형식 태그는 무엇입니까?HTML의 다양한 형식 태그는 무엇입니까?Apr 28, 2025 pm 05:39 PM

이 기사는 웹 컨텐츠를 구조화하고 스타일링하는 데 사용되는 다양한 HTML 서식 태그에 대해 논의하여 텍스트 모양에 미치는 영향과 접근성 및 SEO에 대한 시맨틱 태그의 중요성을 강조합니다.

'ID'속성과 HTML 요소의 '클래스'속성의 차이점은 무엇입니까?'ID'속성과 HTML 요소의 '클래스'속성의 차이점은 무엇입니까?Apr 28, 2025 pm 05:39 PM

이 기사는 고유성, 목적, CSS 구문 및 특이성에 중점을 둔 HTML의 'ID'와 '클래스'속성의 차이점에 대해 설명합니다. 웹 페이지 스타일링 및 기능에 어떤 영향을 미치는지 설명하고 모범 사례를 제공합니다.

HTML의 '클래스'속성은 무엇입니까?HTML의 '클래스'속성은 무엇입니까?Apr 28, 2025 pm 05:37 PM

이 기사는 스타일링 및 JavaScript 조작을위한 요소 그룹에서 HTML '클래스'속성의 역할을 고유 한 'ID'속성과 대조합니다.

See all articles

핫 AI 도구

Undresser.AI Undress

Undresser.AI Undress

사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover

AI Clothes Remover

사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool

Undress AI Tool

무료로 이미지를 벗다

Clothoff.io

Clothoff.io

AI 옷 제거제

Video Face Swap

Video Face Swap

완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!

뜨거운 도구

메모장++7.3.1

메모장++7.3.1

사용하기 쉬운 무료 코드 편집기

SublimeText3 Linux 새 버전

SublimeText3 Linux 새 버전

SublimeText3 Linux 최신 버전

WebStorm Mac 버전

WebStorm Mac 버전

유용한 JavaScript 개발 도구

MinGW - Windows용 미니멀리스트 GNU

MinGW - Windows용 미니멀리스트 GNU

이 프로젝트는 osdn.net/projects/mingw로 마이그레이션되는 중입니다. 계속해서 그곳에서 우리를 팔로우할 수 있습니다. MinGW: GCC(GNU Compiler Collection)의 기본 Windows 포트로, 기본 Windows 애플리케이션을 구축하기 위한 무료 배포 가능 가져오기 라이브러리 및 헤더 파일로 C99 기능을 지원하는 MSVC 런타임에 대한 확장이 포함되어 있습니다. 모든 MinGW 소프트웨어는 64비트 Windows 플랫폼에서 실행될 수 있습니다.

PhpStorm 맥 버전

PhpStorm 맥 버전

최신(2018.2.1) 전문 PHP 통합 개발 도구