×

注意!页面内容来自https://www.w3cschool.cn/,本站不储存任何内容,为了更好的阅读体验进行在线解析,若有广告出现,请及时反馈。若您觉得侵犯了您的利益,请通知我们进行删除,然后访问 原网页

编程课程分类

极客教程免费的在线编程入门教程&技术文档

  • 全部
  • 热门教程
  • HTML/CSS
  • JavaScript
  • 后端语言
  • AI/人工智能
  • 前端框架
  • 开发框架
  • 数据库
  • 移动开发
  • 服务器相关
  • 开发工具
  • 大数据
  • 软件工程
  • 网站建设
  • XML教程

热门官方文档更多 »

查看完整版笔记
App下载
App下载

扫描二维码

下载编程狮App

关注有礼
微信公众号

扫码关注 领资料包

返回顶部
<> /* 初始状态隐藏组件 */ #aiBox.m-aiTool { visibility: hidden; opacity: 0; transition: opacity 0.3s ease; } #aiBox { box-sizing: border-box; } /* 组件加载完成后的显示状态 */ #aiBox.loaded.m-aiTool.loaded { visibility: visible; opacity: 1; } .m-aiTool { display: none; position: fixed; bottom: 20px; right: 5px; width: 40px; height: 40px; } .m-aiTool img { width: 100%; height: 100%; } .ai-warp { position: fixed; bottom: 30px; right: 20px; width: 128px; height: 128px; background-image: url("https://atts.w3cschool.cn/ai-tool.png"); background-repeat: no-repeat; background-position: center; background-size: 100% auto; cursor: pointer; z-index: 2000; user-select: none; /* 防止拖拽时选中文本 */ } /* 修改样式部分 */ #popup-window { position: fixed; bottom: -100%; /* 初始位置在视口下方 */ left: 80px; width: 530px; height: 600px; border: 1px solid #c5c5c5; border-radius: 5px; background-color: #fff; opacity: 0; z-index: 2000; transition: opacity 0.3s ease; } /* 显示状态的样式 */ #popup-window.show { bottom: 20px; opacity: 1; } .popup-window-warp { width: 100%; height: 100%; display: flex; flex-flow: row wrap; } .popup-nav { width: 110px; height: 100%; flex: 0 0 80px; background-color: #232324; padding: 5px; box-sizing: border-box; } .popup-iframe { flex: 1; display: flex; flex-direction: column; background: #fff; overflow: hidden; } .popup-iframe iframe { width: 100%; height: 100%; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; } .popup-iframe .ai-tool-top { padding: 8px; background: #EEF0F4; display: flex; justify-content: flex-end; align-items: center; height: 32px; } .popup-iframe .ai-tool-top .maxkb-chat-close { cursor: pointer; padding: 4px; border-radius: 4px; transition: background-color 0.3s; } .popup-iframe .ai-tool-top .maxkb-closeviewport { cursor: pointer; } .popup-iframe .ai-tool-top .maxkb-openviewport { cursor: pointer; } .popup-iframe .ai-tool-top .maxkb-viewportnone { display: none; } .nav-title-openwin { width: 100px; height: 36px; display: flex; align-items: center; box-sizing: border-box; padding: 5px 3px; margin-bottom: 3px; font-size: 12px; color: rgb(201205212); cursor: pointer; } .nav-title-openwin img { width: 22px; height: 22px; margin-right: 5px; } .nav-title { width: 100px; height: 36px; display: flex; align-items: center; justify-content: center; box-sizing: border-box; padding: 5px 3px; margin-bottom: 3px; font-size: 12px; color: rgb(201205212); cursor: pointer; } .nav-title img { width: 22px; height: 22px; margin-right: 5px; } .nav-title:hover { background-color: #2C2C2D; border-radius: 8px; } .nav-title.nav-active { border-radius: 8px; background-color: #2C2C2D; color: #fff; } /* 放大状态的样式 */ #popup-window.maxkb-enlarge { width: 50% !important; height: 100% !important; top: 0 !important; right: 0 !important; /* 改为right: 0,使其靠右显示 */ left: auto !important; /* 改为auto,避免left属性影响 */ bottom: auto !important; opacity: 1; transition: width 0.3s easeheight 0.3s ease; } /* 移动端适配 */ @media only screen and (max-width: 768px) { #aiBox { display: none; } .m-aiTool { display: block; } } .ai-tool-top { padding: 8px; background: #EEF0F4; display: flex; justify-content: flex-end; align-items: center; height: 32px; box-sizing: border-box; } .tool-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; } .tool-title { font-size: 16px; font-weight: 500; color: #333; } .more-link { display: flex; align-items: center; color: #666; text-decoration: none; font-size: 14px; gap: 4px; } .more-link:hover { color: #1890ff; } .tool-content { flex: 1; overflow-y: auto; padding: 20px; } .tool-grid { display: grid; grid-template-columns: repeat(41fr); gap: 12px; padding: 0; max-width: 100%; } .tool-item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-decoration: none; padding: 8px; border-radius: 6px; transition: background-color 0.3s; aspect-ratio: 1; width: 90px; height: 90px; box-sizing: border-box; } .tool-item:hover { background-color: #e8e8e8; } .tool-icon { width: 32px; height: 32px; /* 固定图标容器高度 */ display: flex; align-items: center; justify-content: center; margin-bottom: 6px; } .tool-icon img { width: 32px; height: 32px; /* 固定图标大小 */ object-fit: contain; /* 保持图片比例 */ } .tool-name { font-size: 12px; color: #333; text-align: center; width: 100%; line-height: 1.2; height: 2.4em; /* 固定文字容器高度,刚好容纳两行 */ overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; padding: 0 4px; position: relative; } /* 工具提示样式 */ .tool-name::after { content: attr(data-tooltip); position: absolute; bottom: -25px; left: 50%; transform: translateX(-50%); background: rgba(0000.75); color: white; padding: 3px 6px; border-radius: 4px; font-size: 12px; white-space: normal; /* 允许提示文字换行 */ max-width: 200px; /* 设置最大宽度 */ text-align: center; z-index: 1000; opacity: 0; visibility: hidden; transition: opacity 0.2svisibility 0.2s; } .tool-name::before { content: ''; position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%); border: 4px solid transparent; border-bottom-color: rgba(0000.75); z-index: 1000; } /* 响应式布局调整 */ @media (max-width: 768px) { .tool-grid { grid-template-columns: repeat(31fr); gap: 10px; } .tool-item { width: 70px; height: 70px; } .tool-icon { width: 28px; height: 28px; } .tool-icon img { width: 20px; height: 20px; } } @media (max-width: 480px) { .tool-grid { grid-template-columns: repeat(21fr); gap: 8px; } .tool-item { width: 60px; height: 60px; } .tool-icon { width: 24px; height: 24px; } .tool-icon img { width: 18px; height: 18px; } .tool-name { font-size: 11px; } } .maxkb-chat-close { cursor: pointer; padding: 4px; border-radius: 4px; transition: background-color 0.3s; } .maxkb-chat-close:hover { background-color: rgba(0000.05); }