uikit实现带夜晚暗黑模式的聊天窗口代码

代码语言:html

所属分类:其他

代码描述:uikit实现带夜晚暗黑模式的聊天窗口代码

代码标签: uikit 聊天

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

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">


    <!-- UIkit CSS -->
    <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/uikit.min.css">

    <!-- UIkit JS -->
    <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/uikit.min.js"></script>
    <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/uikit-icons.min.js"></script>
    <style>
        .uk-card-small.uk-card-body {
          padding: 5px 8px;
          font-size: 13px;
        }
        
        .uk-border-remove {
          border: 0 none;
        }
        
        textarea {
          background: none !important;
          resize: none;
        }
        
        @keyframes dot-anim {
          100% {
            transform: translate(0, 0);
          }
          50% {
            transform: translate(0, -6px);
          }
          0% {
            transform: translate(0, 0);
          }
        }
        .etc i {
          width: 6px;
          height: 6px;
          background: #222;
          border-radius: 100%;
          display: inline-block;
          animation: dot-anim 1s infinite linear;
          transform: translate(0, 0);
        }
        
        .etc {
          display: block;
          position: relative;
        }
        .etc i + i {
          margin-left: 3px;
        }
        .etc i:nth-child(1) {
          animation-delay: 0.5s;
        }
        .etc i:nth-child(2) {
          animation-delay: 0.4s;
        }
        .etc i:nth-child(3) {
          animation-delay: 0.3s;
        }
        
        .uk-card {
          position: relative;
          z-index: 1;
        }
        
        .guest .uk-card:after, .me .uk-card:after {
          width: 10px;
          height: 45px;
          position: absolute;
          bottom: 0;
        }
        
        .guest .uk-card:after {
          background: #fff;
          left: -4px;
          clip-path: polygon(100% 70%, 0% 100%, 100% 100%);
        }
        
        .me .uk-card:after {
          background: #1e87f0;
          right: -4px;
          clip-path: polygon(0 70%, 0% 100%, 100% 100%);
        }
    </style>


</head>

<body>
    <div class="uk-section">
        <div class="uk-container uk-width-large">

            <button class="uk-button uk-button-default uk-position-top-right uk-margin-small-top uk-margin-small-right" uk-toggle="target: .button-label">
      <span class="button-label">Turn off the lights</span>
      <span class="button-label" hidden>Turn on the lights</span>
    </button>

            <div class="uk-card uk-card-default uk-border-rounded uk-margin-large-top">

                <div class="uk-card-body uk-padding-small">

                    <div class="guest uk-grid-small uk-flex-bottom uk-flex-left" uk-grid>
                        <div class="uk-width-auto">
                            <img class="uk-border-circle" width="32" height="32" src="//repo.bfw.wiki/bfwrepo/image/6078f69f7e176.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_100,h_100,/quality,q_90">
                        </div>
                        <div class="uk-width-auto">
                            <div class="uk-card uk-card-body uk-card-small uk-card-default uk-border-rounded">
                                <p class="uk-margin-remove">Hey dude!</p>
                            </div>
                        </div>
                    </div>

                    <div class="me uk-grid-small uk-flex-bottom uk-flex-right uk-text-right" uk-grid>
                        <div class=".........完整代码请登录后点击上方下载按钮下载查看

网友评论0