扑捉一只耿鬼(HTML文件)

2024-08-29 05:44
文章标签 html frontend 一只 耿鬼

本文主要是介绍扑捉一只耿鬼(HTML文件),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

图例:

在这里插入图片描述
在这里插入图片描述

代码:

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8" /><title>耿鬼</title><style>body {background: #fff;font-family: 'Comfortaa', sans-serif;}* {box-sizing: border-box;}*:before,*:after {content: '';position: absolute;}main {width: 400px;height: 400px;margin: auto;text-align: center;}.gengar {background: #9179c6;margin: 3em auto 5em;width: 310px;height: 350px;border-radius: 50% 50% 50% 50%/60% 60% 40% 40%;margin: auto;position: relative;}.gengar .ear {width: 150px;height: 150px;background: #9179c6;border-radius: 10px;position: relative;transform: rotate(-120deg) skewX(-40deg) scale(1, 0.866);position: absolute;top: 0;}.gengar .ear.right {position: absolute;background: #9179c6;transform: rotate(110deg) skewX(40deg) scale(1, 0.866);right: 0;}.gengar .hair {width: 0;height: 0;position: absolute;top: -45px;left: 50%;margin-left: -45px;transform: rotate(10deg);border-bottom: 100px solid #9179c6;border-left: 70px solid transparent;border-right: 70px solid transparent;}.gengar .hair.two,.gengar .hair.two:before,.gengar .hair.two:after {transform: rotate(-30deg);margin-left: -60px;top: -35px;border-bottom: 80px solid #9179c6;border-left: 30px solid transparent;border-right: 30px solid transparent;}.gengar .hair.two:before {transform: rotate(60deg) translate(130px, -50px);}.gengar .hair.two:after {transform: rotate(-15deg) translate(-10px, 48px);border-bottom: 40px solid #9179c6;}.gengar .eye {width: 100px;height: 50px;background: #f6b392;border-radius: 0 0 200px 200px;position: absolute;top: 33%;overflow: hidden;transition: 0.3s ease;}.gengar .eye:before {width: 20px;height: 35px;background: black;border-radius: 100%;transform: rotate(-35deg);}.gengar .eye:after {width: 8px;height: 8px;border-radius: 50%;background: white;left: 43%;top: 10px;}.gengar .eye.one {left: 50%;transform: rotate(35deg);margin-left: -120px;}.gengar .eye.two {transform: rotate(-35deg) scaleX(-1);right: 50%;margin-right: -120px;}.gengar .mouth {position: absolute;left: 50%;margin-left: -125px;top: 7%;width: 250px;height: 190px;border-radius: 50%;box-shadow: 0 75px 0 -10px white;transition: 0.3s ease;}.gengar .leg {position: absolute;width: 320px;height: 130px;border-top-left-radius: 200px;border-top-right-radius: 200px;border: 80px solid #7a63ad;border-bottom: 0;top: 75%;left: 0;right: 0;margin: auto;z-index: -1;}.gengar .leg:before,.gengar .leg:after {height: 20px;border-radius: 10px;width: 85px;bottom: -5px;background: #7a63ad;}.gengar .leg:before {left: -84.5px;}.gengar .leg:after {right: -84.5px;}.gengar .hand {position: absolute;width: 85px;height: 140px;background: #9179c6;border-radius: 50% 50% 50% 50%/40% 40% 60% 60%;transform: rotate(59deg);top: 31%;left: -40px;}.gengar .hand.two {transform: rotate(-59deg);left: auto;right: -40px;}input[type='checkbox'] {height: 0;width: 0;visibility: hidden;}label {background: #eee;width: 160px;height: 75px;border-radius: 80px;display: inline-block;margin: 4em auto;position: relative;cursor: pointer;}label span {position: absolute;top: 5px;left: 5px;width: 65px;height: 65px;background: #333;border-radius: 50%;transition: 0.5s;border: 3px solid #222;background: radial-gradient(#fff, #fff 15%, #333 15%, #333 24%, transparent 24%), linear-gradient(to bottom, #d02222, #d02222 45%, #222 45%, #222 52%, #fff 52%);}input:checked+label span {left: 90px;transform: rotate(360deg);background: #f38dcb;border-radius: 200% 320% 150% 150%;border-radius: 50%;background-repeat: no-repeat;background-image: radial-gradient(ellipse, black 50%, transparent 50%), radial-gradient(ellipse, black 50%, transparent 50%), linear-gradient(#333, #333);background-size: 6px 6px, 6px 6px, 25px 2px;background-position: 28% 50%, 80% 50%, 55% 64%;}input:checked~.gengar .eye {background: black;width: 16px;height: 16px;border-radius: 50%;}input:checked~.gengar .eye.one {margin-left: -60px;}input:checked~.gengar .eye.two {margin-right: -60px;}input:checked~.gengar .eye:before,input:checked~.gengar .eye:after {content: none;}input:checked~.gengar .mouth {margin-left: -100px;top: 35%;width: 210px;height: 50px;border-radius: 50%;box-shadow: 0 15px 0 -10px #131313;}</style>
</head><body><main><input type="checkbox" id="ditto-me" /><label for="ditto-me"><span></span></label><div class="gengar"><div class="ear left"></div><div class="ear right"></div><div class="hair"></div><div class="hair two"></div><div class="hand"></div><div class="hand two"></div><div class="mouth"></div><div class="eye one"></div><div class="eye two"></div><div class="leg"></div></div></main>
</body></html>

这篇关于扑捉一只耿鬼(HTML文件)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1117005

相关文章

Vue项目的甘特图组件之dhtmlx-gantt使用教程和实现效果展示(推荐)

《Vue项目的甘特图组件之dhtmlx-gantt使用教程和实现效果展示(推荐)》文章介绍了如何使用dhtmlx-gantt组件来实现公司的甘特图需求,并提供了一个简单的Vue组件示例,文章还分享了一... 目录一、首先 npm 安装插件二、创建一个vue组件三、业务页面内 引用自定义组件:四、dhtmlx

Vue ElementUI中Upload组件批量上传的实现代码

《VueElementUI中Upload组件批量上传的实现代码》ElementUI中Upload组件批量上传通过获取upload组件的DOM、文件、上传地址和数据,封装uploadFiles方法,使... ElementUI中Upload组件如何批量上传首先就是upload组件 <el-upl

前端知识点之Javascript选择输入框confirm用法

《前端知识点之Javascript选择输入框confirm用法》:本文主要介绍JavaScript中的confirm方法的基本用法、功能特点、注意事项及常见用途,文中通过代码介绍的非常详细,对大家... 目录1. 基本用法2. 功能特点①阻塞行为:confirm 对话框会阻塞脚本的执行,直到用户作出选择。②

如何使用CSS3实现波浪式图片墙

《如何使用CSS3实现波浪式图片墙》:本文主要介绍了如何使用CSS3的transform属性和动画技巧实现波浪式图片墙,通过设置图片的垂直偏移量,并使用动画使其周期性地改变位置,可以创建出动态且具有波浪效果的图片墙,同时,还强调了响应式设计的重要性,以确保图片墙在不同设备上都能良好显示,详细内容请阅读本文,希望能对你有所帮助...

CSS3 最强二维布局系统之Grid 网格布局

《CSS3最强二维布局系统之Grid网格布局》CS3的Grid网格布局是目前最强的二维布局系统,可以同时对列和行进行处理,将网页划分成一个个网格,可以任意组合不同的网格,做出各种各样的布局,本文介... 深入学习 css3 目前最强大的布局系统 Grid 网格布局Grid 网格布局的基本认识Grid 网

HTML5中下拉框<select>标签的属性和样式详解

《HTML5中下拉框<select>标签的属性和样式详解》在HTML5中,下拉框(select标签)作为表单的重要组成部分,为用户提供了一个从预定义选项中选择值的方式,本文将深入探讨select标签的... 在html5中,下拉框(<select>标签)作为表单的重要组成部分,为用户提供了一个从预定义选项中

前端 CSS 动态设置样式::class、:style 等技巧(推荐)

《前端CSS动态设置样式::class、:style等技巧(推荐)》:本文主要介绍了Vue.js中动态绑定类名和内联样式的两种方法:对象语法和数组语法,通过对象语法,可以根据条件动态切换类名或样式;通过数组语法,可以同时绑定多个类名或样式,此外,还可以结合计算属性来生成复杂的类名或样式对象,详细内容请阅读本文,希望能对你有所帮助...

禁止HTML页面滚动的操作方法

《禁止HTML页面滚动的操作方法》:本文主要介绍了三种禁止HTML页面滚动的方法:通过CSS的overflow属性、使用JavaScript的滚动事件监听器以及使用CSS的position:fixed属性,每种方法都有其适用场景和优缺点,详细内容请阅读本文,希望能对你有所帮助... 在前端开发中,禁止htm

Vue3中的动态组件详解

《Vue3中的动态组件详解》本文介绍了Vue3中的动态组件,通过`component:is=动态组件名或组件对象/component`来实现根据条件动态渲染不同的组件,此外,还提到了使用`markRa... 目录vue3动态组件动态组件的基本使用第一种写法第二种写法性能优化解决方法总结Vue3动态组件动态

spring-boot-starter-thymeleaf加载外部html文件方式

《spring-boot-starter-thymeleaf加载外部html文件方式》本文介绍了在SpringMVC中使用Thymeleaf模板引擎加载外部HTML文件的方法,以及在SpringBoo... 目录1.Thymeleaf介绍2.springboot使用thymeleaf2.1.引入spring