当前位置:首页 > 网站应用 > 正文内容

摇摆的灯光

cjw1239个月前 (09-20)网站应用1490

点击运行看演示效果!

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

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>摇摆的灯光</title>
  <style>
    *{padding:0;margin:0}body{height:100vh;background:#212534;display:flex;align-items:center;justify-content:center;font-family:"Montserrat",sans-serif;font-size:50px}.room{position:relative;max-width:600px;width:100%;height:400px;border:1px solid white;display:flex;justify-content:center;align-items:flex-end}.room:before{content:'';position:absolute;top:0;width:40px;height:10px;background:#D3AF37;border-radius:0px 0px 10px 10px}.lamp{position:absolute;inset:0 auto 0 auto;width:40px;height:150px;display:flex;justify-content:center;animation:move 3s cubic-bezier(0.645,0.045,0.355,1.000) infinite alternate;transform-origin:top center}.lamp .line{width:2px;height:100%;background:#D3AF37}.lamp .base{position:absolute;bottom:0;width:100%;height:30px;background:#D3AF37;transform:translateY(100%);border-radius:50% 50% 50% 50% / 50% 50% 0 0;perspective:4px}.light{position:absolute;left:50%;bottom:0;transform-style:preserve-3d;transform:translate(-50%,calc(100% + 9px)) rotateX(3deg);width:55px;height:60px;background:white;box-shadow:0 1px 8.3px 5.8px #fff,0 1px 10.5px 0px #fff}.text{position:relative;width:100%;height:50%;display:flex;align-items:center;justify-content:center;z-index:1}.text span{color:#212534;mix-blend-mode:difference}@keyframes move{0%{transform:rotate(35deg)}100%{transform:rotate(-35deg)}}
  </style>
</head>

<body>
  <div class="room">
    <div class="lamp">
      <div class="line"></div>
      <div class="base">
        <div class="light"></div>
      </div>
    </div>
    <div class="text">
      <span>追求完美BLOG</span>
    </div>
  </div>
</body>

</html>


扫描二维码推送至手机访问。

版权声明:本文由追求完美发布,如需转载请注明出处。

本文链接:https://www.cjw123.com/blog/?id=105

标签: html
分享给朋友:

相关文章

html meta标签屏蔽搜索引擎的用法

html页面中的 meta 标签可以用来识别搜索引擎的蜘蛛类型,可以规定meta标签所在的html页面是否被蜘蛛抓取,下面是这个meta标签的用法,大家可以借鉴一下。搜索引擎的 meta 标签的解析下面是meta标签对搜索引擎的解析<meta name='robot...

js报表双击固定样式,用于对比

在很多报表中,需要鼠标上下选择时显示对比颜色,在双击时显示固定的色表示选中状态。<table style="width:80%" border=1 onmouseover="getrow(this)" onmous...

好看的网站自适应图片文字广告位代码

<div class="ad"> <!--图片横幅广告--> <a href="https://www.cjw123.com/blog/" target="_blank"&nb...

分享一些可用的网站生成图片接口地址(网站截图api接口)

做导航网站时,处于设计需要及提高用户体验,可能需要给网站截图以调用显示,这就需要把网站生成图片,手动操作可以使用截图工具,或是使用谷歌浏览器开发者工具命令screenshot来生成网站截图,也可使用一些在线网站生成图片的工具,这些都可以把网站生成图片,那么如何自动为网站生成图片?网址截图api接口又...

google谷歌翻译镜像网站

查找外文资料对于外语不好的那必须要借助翻译工具,各家翻译工具各有不同,想要使用google谷歌翻译,奈何无法访问,那么如何在国内使用谷歌翻译?google谷歌翻译镜像网站有哪些?https://translate.yunkuerp.cn/https://translate.renwole.com/h...

打字机效果的带超链接的新闻标题

<html> <head> <title>打字效果的带链接的新闻标题</title> <meta http-equiv="Content-Type" content="text/html;&...

发表评论

访客

看不清,换一张

◎欢迎参与讨论,请在这里发表您的看法和观点。