应网友要求,也方便大家一起学习,在此贴出昨天编写旋转六面体源码
<!DOCTYPE html><html><head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title>hexahedron</title> <meta name="description" content=""> <meta name="keywords" content=""> <style type="text/css"> .hexahedron { margin: 100px auto; width: 200px; height: 200px; perspective: 1000px; perspective-origin: 50% 50%; } .top, .bottom, .left, .right, .front, .back { position: absolute; top: 0px; left: 0px; border: 1px solid #000; width: 200px; height: 200px; text-align: center; font: bold 30px/200px "microsoft yahei"; opacity: .6; transition: 1s; } .top { animation: opentop 1s both linear 0s 1; } .bottom { animation: openbottom 1s both linear 1s 1; } .left { animation: openleft 1s both linear 2s 1; } .right { animation: openright 1s both linear 3s 1; } .front { animation: openfront 1s both linear 4s 1; } .back { animation: openback 1s both linear 5s 1; } .all { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; animation: animation 6s both linear 6s infinite; } .all:hover .top { color: #fff; background: red; } .all:hover .bottom { color: #fff; background: orange; } .all:hover .left { color: #fff; background: yellow; } .all:hover .right { color: #fff; background: green; } .all:hover .front { color: #fff; background: cyan; } .all:hover .back { color: #fff; background: blue; } @keyframes opentop { 0% { transform: none; } 100% { transform: translateZ(-100px) rotate3d(1, 0, 0, 90deg); transform-origin: 0 0; } } @keyframes openbottom { 0% { transform: none; } 100% { transform: translateZ(-100px) rotate3d(1, 0, 0, -90deg); transform-origin: 50% 100%; } } @keyframes openleft { 0% { transform: none; } 100% { transform: translateZ(-100px) rotate3d(0, 1, 0, -90deg); transform-origin: 0 0; } } @keyframes openright { 0% { transform: none; } 100% { transform: translateZ(-100px) rotate3d(0, 1, 0, 90deg); transform-origin: 100% 50%; } } @keyframes openfront { 0% { transform: none; } 100% { transform: translateZ(100px); } } @keyframes openback { 0% { transform: none; } 100% { transform: translateZ(-100px); } } @keyframes animation { 0% { transform: rotate3d(0, 0, 0); } 100% { /*transform: rotate3d(0,0,0,90deg);*/ transform: rotateX(180deg) rotateY(180deg) rotateZ(180deg); } } </style></head><body> <div class="hexahedron"> <div class="all"> <div class="top">top</div> <div class="bottom">bottom</div> <div class="left">left</div> <div class="right">right</div> <div class="front">front</div> <div class="back">back</div> </div> </div></body></html>

WebDevelovermentReliesonHtml,CSS和JavaScript:1)HTMLStructuresContent,2)CSSStyleSIT和3)JavaScriptAddSstractivity,形成thebasisofmodernWebemodernWebExexperiences。

HTML的作用是通过标签和属性定义网页的结构和内容。1.HTML通过到、等标签组织内容,使其易于阅读和理解。2.使用语义化标签如、等增强可访问性和SEO。3.优化HTML代码可以提高网页加载速度和用户体验。

htmlisaspecifictypefodyfocusedonstructuringwebcontent,而“代码” badlyLyCludEslanguagesLikeLikejavascriptandPytyPythonForFunctionality.1)htmldefineswebpagertuctureduseTags.2)“代码”代码“ code” code code code codeSpassSesseseseseseseseAwiderRangeLangeLangeforLageforLogageforLogicIctInterract

HTML、CSS和JavaScript是Web开发的三大支柱。1.HTML定义网页结构,使用标签如、等。2.CSS控制网页样式,使用选择器和属性如color、font-size等。3.JavaScript实现动态效果和交互,通过事件监听和DOM操作。

HTML定义网页结构,CSS负责样式和布局,JavaScript赋予动态交互。三者在网页开发中各司其职,共同构建丰富多彩的网站。

HTML适合初学者学习,因为它简单易学且能快速看到成果。1)HTML的学习曲线平缓,易于上手。2)只需掌握基本标签即可开始创建网页。3)灵活性高,可与CSS和JavaScript结合使用。4)丰富的学习资源和现代工具支持学习过程。

AnexampleOfAstartingTaginHtmlis,beginSaparagraph.startingTagSareEssentialInhtmlastheyInitiateEllements,defiteTheeTheErtypes,andarecrucialforsstructuringwebpages wepages webpages andConstructingthedom。

如何设计菜单中的虚线分割效果?在设计菜单时,菜名和价格的左右对齐通常不难实现,但中间的虚线或点如何...


热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

AI Hentai Generator
免费生成ai无尽的。

热门文章

热工具

EditPlus 中文破解版
体积小,语法高亮,不支持代码提示功能

记事本++7.3.1
好用且免费的代码编辑器

SecLists
SecLists是最终安全测试人员的伙伴。它是一个包含各种类型列表的集合,这些列表在安全评估过程中经常使用,都在一个地方。SecLists通过方便地提供安全测试人员可能需要的所有列表,帮助提高安全测试的效率和生产力。列表类型包括用户名、密码、URL、模糊测试有效载荷、敏感数据模式、Web shell等等。测试人员只需将此存储库拉到新的测试机上,他就可以访问到所需的每种类型的列表。

MinGW - 适用于 Windows 的极简 GNU
这个项目正在迁移到osdn.net/projects/mingw的过程中,你可以继续在那里关注我们。MinGW:GNU编译器集合(GCC)的本地Windows移植版本,可自由分发的导入库和用于构建本地Windows应用程序的头文件;包括对MSVC运行时的扩展,以支持C99功能。MinGW的所有软件都可以在64位Windows平台上运行。

ZendStudio 13.5.1 Mac
功能强大的PHP集成开发环境