Tom and Jerry Light code
来源:dev.to
时间:2024-09-17 15:30:34 409浏览 收藏
从现在开始,努力学习吧!本文《Tom and Jerry Light code》主要讲解了等等相关知识点,我会在golang学习网中持续更新相关的系列文章,欢迎大家关注并积极留言建议。下面就先一起来看一下本篇正文内容吧,希望能帮到你!
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Hut Light Effect</title> <style> /* Internal CSS */ body { margin: 0; display: flex; justify-content: center; align-items: center; height: 100vh; background: #333; } .hut { position: relative; width: 300px; height: 200px; background: #7c4d3e; /* Hut exterior color */ border-radius: 10px; box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5); } .hut::before { content: ''; position: absolute; top: -100px; /* Position the triangle on top */ left: 0; width: 0; height: 0; border-left: 150px solid transparent; border-right: 150px solid transparent; border-bottom: 100px solid #7c4d3e; /* Same color as the hut */ } .door { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); width: 80px; height: 100px; background: black; border-radius: 5px; transition: background 0.5s ease-in-out; } .hole { position: absolute; top: -80px; left: 50%; transform: translateX(-50%); width: 70px; height: 70px; background: black; border-radius: 80%; transition: background 0.5s ease-in-out; z-index: 10; } .button { position: absolute; bottom: 0%; transform: translateY(-50%); padding: 10px 20px; background: #555; color: #fff; border-radius: 5px; cursor: pointer; z-index: 20; transition: background 0.3s ease; } .button:hover { background: #777; } .button:hover ~ .hut .door, .button:hover ~ .hut .hole { background: rgb(234, 234, 13); } .jerry, .tom { display: none; } .button:hover ~ .hut .door .jerry, .button:hover ~ .hut .hole .tom { display: block; } .tom { margin-top: 0px; margin-left: 3px; height: 70px; width: 70px; border-radius: 80%; } .jerry { height: 80px; width: 80px; } </style> </head> <body> <div class="button">Turn On Light</div> <div class="hut"> <div class="door"> <img class="jerry" src="./jerry.png" alt="Jerry"> </div> <div class="hole"> <img class="tom" src="./tom.png" alt="Tom"> </div> </div> </body> </html>`
好了,本文到此结束,带大家了解了《Tom and Jerry Light code》,希望本文对你有所帮助!关注golang学习网公众号,给大家分享更多文章知识!
声明:本文转载于:dev.to 如有侵犯,请联系study_golang@163.com删除
相关阅读
更多>
-
501 收藏
-
501 收藏
-
501 收藏
-
501 收藏
-
501 收藏
最新阅读
更多>
-
264 收藏
-
335 收藏
-
283 收藏
-
416 收藏
-
482 收藏
-
304 收藏
课程推荐
更多>
-
- 前端进阶之JavaScript设计模式
- 设计模式是开发人员在软件开发过程中面临一般问题时的解决方案,代表了最佳的实践。本课程的主打内容包括JS常见设计模式以及具体应用场景,打造一站式知识长龙服务,适合有JS基础的同学学习。
- 立即学习 541次学习
-
- GO语言核心编程课程
- 本课程采用真实案例,全面具体可落地,从理论到实践,一步一步将GO核心编程技术、编程思想、底层实现融会贯通,使学习者贴近时代脉搏,做IT互联网时代的弄潮儿。
- 立即学习 506次学习
-
- 简单聊聊mysql8与网络通信
- 如有问题加微信:Le-studyg;在课程中,我们将首先介绍MySQL8的新特性,包括性能优化、安全增强、新数据类型等,帮助学生快速熟悉MySQL8的最新功能。接着,我们将深入解析MySQL的网络通信机制,包括协议、连接管理、数据传输等,让
- 立即学习 497次学习
-
- JavaScript正则表达式基础与实战
- 在任何一门编程语言中,正则表达式,都是一项重要的知识,它提供了高效的字符串匹配与捕获机制,可以极大的简化程序设计。
- 立即学习 487次学习
-
- 从零制作响应式网站—Grid布局
- 本系列教程将展示从零制作一个假想的网络科技公司官网,分为导航,轮播,关于我们,成功案例,服务流程,团队介绍,数据部分,公司动态,底部信息等内容区块。网站整体采用CSSGrid布局,支持响应式,有流畅过渡和展现动画。
- 立即学习 484次学习