tailwind实现文字卡片堆叠点击悬浮展开动画效果代码

代码语言:html

所属分类:其他

代码描述:tailwind实现文字卡片堆叠点击悬浮展开动画效果代码

代码标签: tailwind 文字 卡片 堆叠 点击 悬浮 展开 动画

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">

  
  
  

</head>

<body translate="no">
  <div id="stack" class="relative group cursor-pointer">
  <div class="absolute top-2 block max-w-sm p-6 my-6 mx-3 bg-white border border-gray-200 rounded-lg shadow group-hover:top-4 group-hover:rotate-3 transition-all">
    <h2 class="mb-2 text-2xl font-bold tracking-tight text-gray-900">Some card</h2>
    <p class="font-normal text-gray-700">Look at me, I am a card</p>
  </div>

  <div class="absolute top-1 block max-w-sm p-6 my-6 mx-3 bg-white border border-gray-200 rounded-lg shadow group-hover:top-2 group-hover:-rotate-3 transition-all">
    <h2 class="mb-2 text-2xl font-bold tracking-tight text-gray-900">Some card</h2>
    <p class="font-normal text-gray-700">Look at me, I am a card</p>
 .........完整代码请登录后点击上方下载按钮下载查看

网友评论0