css爱心表白动画效果代码

代码语言:html

所属分类:表白

代码描述:css爱心表白动画效果代码

代码标签: css 爱心 表白 动画

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

<!DOCTYPE html>
<html>

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


    <style>
        body {
          background-color: #ccc;
        }
        .container {
          width: 512px;
          height: 380px;
          margin: auto;
          margin-top: 0;
        }
        
        .heart {
          z-index: 1;
          width: 150px;
          height: 150px;
          position: absolute;
          top: 50%;
          margin-top: -75px;
          left: 50%;
          margin-left: -75px;
          background-size: 100%;
          background-repeat: no-repeat;
          background-image:url("data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgd2lkdGg9IjE3M3B4IiBoZWlnaHQ9IjE1OHB4IiB2aWV3Qm94PSIwIDAgMTczIDE1OCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTczIDE1OCIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8cGF0aCBmaWxsPSIjRUY0NjU3IiBkPSJNMTU3LjMzMSwxNS41MDRjLTE5LjU1OS0xOS41NTktNTEuMjcxLTE5LjU1OS03MC44MzEsMGMtMTkuNTU5LTE5LjU1OS01MS4yNzEtMTkuNTU5LTcwLjgzMSwwDQoJYy0xOS41NTksMTkuNTU5LTE5LjU1OSw1MS4yNzEsMCw3MC44MzFsNzAuODMxLDcwLjgzbDcwLjgzMS03MC44M0MxNzYuODksNjYuNzc1LDE3Ni44OSwzNS4wNjQsMTU3LjMzMSwxNS41MDR6Ii8+DQo8L3N2Zz4=");
        }
        .hometown {
          font-family:'Inconsolata', sans-serif;
          font-weight: bold;
          font-size: 2.0em;
          text-transform: uppercase;
          position: relative;
          z-index: 1;
          width: 512px;
          height: 512px;
          color: #FFF;
        }
        #top {
          width: 200px;
          margin: auto;
          position: relative;
        }
        #top span {
          height: 350px;
          position: absolute;
          width: 20px;
          left: 50%;
          margin-left: -10px;
          top: 110px;
        }
        .char1 {
        	transform: rotate(-36deg);
        }
        .char2 {
        	transform: rotate(-24deg);
        }
        .char3 {
        	transform: rotate(-12deg);
        }
        .char4 {
        	transform: rotate(0deg);
        }
        .char5 {
        	transform: rotate(12deg);
        }
        .char6 {
        	transform: rotate(24deg);
        }
        .char7 {
        	transform: rotate(36deg);
        }
        
        #bottom span {
          height: 350px;
          line-height: 700px;
          position: absolute;
          width: 20px;
          left: 50%;
          margin-left: -10px;
          top: 10px;
        }
        
        #bottom .char1 {
        	transform: rotate(36deg);
        }
        #bottom .char2 {
        	transform: rotate(27deg);
        }
        #bottom .char3 {
        	transform: rotate(18deg);
     .........完整代码请登录后点击上方下载按钮下载查看

网友评论0