当前位置: 首页 > news >正文

4. 文字效果/2D-3D转换 - 3D翻转卡片

4. 文字效果/2D-3D转换 - 3D翻转卡片

案例:3D产品展示卡片

<!DOCTYPE html>
<html><head><meta charset="utf-8"><title></title></head><style type="text/css">.scene {width: 300px;height: 400px;perspective: 1000px;margin: 50px auto;}.card {width: 100%;height: 100%;position: relative;transition: transform 1s;transform-style: preserve-3d;}.scene:hover .card {transform: rotateY(180deg);}.card-face {position: absolute;width: 100%;height: 100%;backface-visibility: hidden;border-radius: 10px;overflow: hidden;box-shadow: 0 5px 15px rgba(0,0,0,0.3);}.card-front {background: linear-gradient(45deg, #ff9a9e, #fad0c4);display: flex;flex-direction: column;align-items: center;justify-content: center;}.card-back {background: linear-gradient(45deg, #a18cd1, #fbc2eb);transform: rotateY(180deg);padding: 20px;box-sizing: border-box;}.product-title {font-size: 24px;margin-bottom: 10px;color: white;text-shadow: 2px 2px 4px rgba(0,0,0,0.3);}.product-image {width: 80%;filter: drop-shadow(5px 5px 10px rgba(0,0,0,0.2));}.product-description {color: white;line-height: 1.6;}</style><body><div class="scene"><div class="card"><div class="card-face card-front"><h2 class="product-title">智能手表</h2><img src="smartwatch.png" class="product-image"></div><div class="card-face card-back"><h3>产品特性</h3><p class="product-description">心率监测 | 运动追踪 | 50米防水<br>14天续航 | 通知提醒 | 多种表盘</p><div class="price">¥899</div></div></div></div></body>
</html>

在这里插入图片描述

相关文章:

  • 基于 Flower 框架的可穿戴设备健康数据个性化健康管理平台研究
  • 当java进程内存使用超过jvm设置大小会发生什么?
  • 【RabbitMQ】工作队列和发布/订阅模式的具体实现
  • binlog日志以及MySQL的数据同步
  • CSS经典布局之圣杯布局和双飞翼布局
  • NLTK库: 数据集3-分类与标注语料(Categorized and Tagged Corpora)
  • archlinux中挂载macOS的硬盘
  • Mac修改hosts文件方法
  • 信息论14:从互信息到信息瓶颈——解锁数据压缩与特征提取的秘密
  • Jsp技术入门指南【十三】基于 JSTL SQL 标签库实现 MySQL 数据库连接与数据分页展示
  • Excel宏和VBA的详细分步指南
  • 进程间通信分类
  • org.slf4j.MDC介绍-笔记
  • 奇怪的公式
  • IntelliJ IDEA给Controller、Service、Mapper不同文件设置不同的文件头注释模板、Velocity模板引擎
  • 【认知思维】光环效应:第一印象的持久力量
  • 中国版 Cursor---腾讯云 CodeBuddy | 从安装VSCode到数独小游戏问世
  • IDEA查看类结构视图窗口,接口的所有的实现类图
  • TensorFlow 常见使用场景及开源项目实例
  • Spring WebFlux 与 WebClient 使用指南
  • 中国-拉共体成员国重点领域合作共同行动计划(2025-2027)
  • “一码难求”的Manus开放注册但价格不菲,智能体距离“实用”还有多远
  • 京东美团饿了么等外卖平台被约谈
  • 杭州钱塘区3宗涉宅用地均以底价成交,共计成交金额25.73亿元
  • 铁路部门:确保沿线群众安全,焦柳铁路6个区段将陆续安装防护栅栏
  • 朝着解决问题的正确方向迈进——中美经贸高层会谈牵动世界目光