vue实现带代码高亮显示与打字动画本地存储及一键复制的chatgpt聊天对话窗口代码

代码语言:html

所属分类:其他

代码描述:vue实现带代码高亮显示与打字动画本地存储及一键复制的chatgpt聊天对话窗口代码,修改api接口即可一键打造自己的chatgpt应用。

代码标签: vue 代码 高亮 打字 动画 本地 存储 一键复制 chatgpt 聊天 对话 窗口 代码

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

<!DOCTYPE html>
<html lang="en" >
<head>
  <meta charset="UTF-8">
<style>
    @import 'https://fonts.googleapis.com/css?family=Roboto+Condensed:300';
* {
  box-sizing: border-box;
}

body {
  display: flex;
  justify-content: center;
  background-color: #3fc26d;
  font-family: "Roboto Condensed", sans-serif;
  font-size: 16px;
  line-height: 1.875em;
}

.container {
  flex: 1 0 auto;
  margin-top: 50px;
  margin-bottom: 50px;
  max-width: 1000px;
  box-shadow: 10px 10px 0 #87f4ad;
  background-color: #fff;
}

.small {
  font-size: 0.75em;
  line-height: 1.5em;
}

.disabled {
  color: #c4c4c4;
}

.chat-wrapper {
  display: flex;
  flex-direction: column;
  padding: 30px;
  height: 600px;
  overflow-y: auto;
}
.bubble  pre{
     white-space: pre-wrap;
     color:#ececec;
     background: black;
     padding: 10px;
    margin: 0;
}
.bubble  p{
    margin: 0;
    padding: 2px;
}
.bubble  ol{
    margin: 0;
    padding:0 0 0 18px;
}
.bubble  li{
    margin: 0;
    padding: 2px;
}
.bubble {
        line-height: 22px;
  position: relative;
    white-space: pre-wrap;
  width: auto;
  max-width: 650px;
  margin-bottom: 20px;
  padding: 20px 40px;
  border-radius: 25px;
  box-shadow: 5px 5px 0 #87f4ad;
  font-weight: 300;
  transform: scale(0);
  -webkit-animation-name: scaleAll;
          animation-name: scaleAll;
  -webkit-animation-duration: 0.35s;
          animation-duration: 0.35s;
  -webkit-animation-timing-function: cubic-bezier(0, 0.51, 0.31, 1.51);
          animation-timing-function: cubic-bezier(0, 0.51, 0.31, 1.51);
  -webkit-animation-fill-mode: forwards;
          animation-fill-mode: forwards;
}
.bubble-right {
  margin-left: auto;
  border-bottom-right-radius: 3px;
  background-color: #7be5bc;
  transform-origin: bottom right;
}
.bubble-left {
  margin-right: auto;
  border-bottom-l.........完整代码请登录后点击上方下载按钮下载查看

网友评论0