div+css实现ai大模型聊天输入框美化效果代码

代码语言:html

所属分类:表单美化

代码描述:div+css实现ai大模型聊天输入框美化效果代码

代码标签: div css ai 大模型 聊天 输入框 美化

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

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum=1.0,minimum=1.0,user-scalable=0" />
 
     <style>
body{
    background: black;
}
.ai-chat-input {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding: 1.5em;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.chat-container {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 1.25em;
  background: linear-gradient(
    135deg,
    rgba(39, 39, 42, 0.8),
    rgba(9, 9, 11, 0.9)
  );
  border: 1px solid rgba(113, 113, 122, 0.5);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(20px);
  overflow: hidden;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1em 1.5em 0.5em;
}

.status-section {
  display: flex;
  align-items: center;
  gap: 0.375em;
}

.status-indicator {
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background-color: #22c55e;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.status-text {
  font-size: 0.75em;
  font-weight: 500;
  color: #a1a1aa;
}

.badges {
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.badge {
  padding: 0.25em 0.5em;
  font-size: 0.75em;
  font-weight: 500;
  border-radius: 1em;
}

.badge-gpt {
  background-color: rgba(39, 39, 42, 0.6);
  color: #d4d4d8;
}

.badge-pro {
  background-color: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.input-section {
  position: relative;
  overflow: hidden;
}

.main-input {
  width: 100%;
  padding: 1em 1.5em;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  font-size: 1em;
  font-weight: normal;
  line-height: 1.6;
  min-height: 7.5em;
  color: #f4f4f5;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.main-input::-webkit-scrollbar {
  display: none;
}

.main-input::placeholder {
  color: #71717a;
}

.gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(39, 39, 42, 0.05), transparent);
  pointer-events: n.........完整代码请登录后点击上方下载按钮下载查看

网友评论0