当前位置:首页 > 文章列表 > 文章 > 前端 > HTML与TailwindCSS入门教程

HTML与TailwindCSS入门教程

2025-10-29 23:13:07 0浏览 收藏

目前golang学习网上已经有很多关于文章的文章了,自己在初次阅读这些文章中,也见识到了很多学习思路;那么本文《HTML与TailwindCSS快速上手指南》,也希望能帮助到大家,如果阅读完后真的对你学习文章有帮助,欢迎动动手指,评论留言并分享~

使用HTML结合TailwindCSS可快速实现现代化UI。首先创建标准HTML5文件,通过CDN引入TailwindCSS或使用npm本地安装并配置tailwind.config.js,设置内容扫描路径,创建input.css写入@tailwind指令,编译生成output.css后在HTML中链接,最后利用bg-blue-500、flex、md:等实用类快速构建响应式界面。

HTML与TailwindCSS快速样式前端工具_HTML与TailwindCSS快速样式前端工具步骤指南

如果您正在开发一个前端项目,并希望快速实现现代化的用户界面,但又不想编写大量自定义CSS代码,使用HTML结合TailwindCSS是一个高效的选择。以下是将TailwindCSS集成到HTML项目中并快速应用样式的具体步骤:

一、创建基础HTML文件

在开始使用TailwindCSS之前,需要先建立一个标准的HTML5文档结构。这为后续引入TailwindCSS和添加样式提供基础环境。

1、创建一个新的HTML文件,例如 index.html。

2、输入基本的HTML5文档结构,包括 声明和必要的标签如 、、。

3、在 标签中设置页面标题,以便在浏览器标签页中正确显示。</p> <h2>二、引入TailwindCSS CDN(适用于快速原型)</h2> <p>对于学习、测试或快速原型开发,可以通过CDN直接在HTML文件中引入TailwindCSS,无需本地构建过程。</p> <p>1、访问官方文档推荐的UNPKG链接获取最新版本的TailwindCSS。</p> <p>2、将以下 <strong><font color="green">https://cdn.jsdelivr.net/npm/tailwindcss@^3.0/dist/tailwind.min.css</font></strong> 链接通过 <link> 标签插入到HTML文件的 <head> 区域。</p> <p>3、确保网络连接正常,以便浏览器可以成功加载外部资源。</p> <h2>三、使用npm安装TailwindCSS(适用于生产项目)</h2> <p>在正式项目中,建议通过npm进行本地安装,以获得更好的性能控制和自定义能力。</p> <p>1、打开终端并进入项目根目录,运行命令 <strong><font color="green">npm init -y</font></strong> 初始化package.json文件。</p> <p>2、执行 <strong><font color="green">npm install -D tailwindcss</font></strong> 安装TailwindCSS作为开发依赖。</p> <p>3、创建tailwind.config.js配置文件,使用命令 <strong><font color="green">npx tailwindcss init</font></strong> 生成默认配置。</p> <h2>四、配置TailwindCSS扫描范围</h2> <p>为了使Tailwind能够识别项目中使用的类名并生成对应的CSS,必须正确配置内容扫描路径。</p> <p>1、打开生成的 tailwind.config.js 文件。</p> <p>2、在 content 或 purge 字段中添加需要扫描的文件路径,例如:<strong><font color="green">content: ["./**/*.html"]</font></strong>。</p> <p>3、保存配置文件,确保所有包含Tailwind类名的模板文件都在指定路径下。</p> <h2>五、创建并编译输出CSS文件</h2> <p>通过构建命令将Tailwind指令转换为实际可用的CSS样式表,并输出到指定位置。</p> <p>1、在项目中创建一个名为 input.css 的源文件,通常放在 src/css/ 目录下。</p> <p>2、在该文件中写入 @tailwind base;、@tailwind components; 和 @tailwind utilities; 指令。</p> <p>3、在 package.json 中添加构建脚本:"build": "npx tailwindcss -i ./src/css/input.css -o ./dist/css/output.css --watch"。</p> <p>4、运行 <strong><font color="green">npm run build</font></strong> 启动编译进程,生成最终的CSS文件。</p> <h2>六、在HTML中链接生成的CSS文件</h2> <p>将编译后的TailwindCSS文件引入HTML页面,使样式生效。</p> <p>1、在HTML文件的 <head> 标签内添加 <link rel="stylesheet" href="./dist/css/output.css">。</p> <p>2、确认路径正确无误,避免因路径错误导致样式未加载。</p> <p>3、刷新页面后,即可使用Tailwind提供的实用类来设计界面元素。</p> <h2>七、使用Tailwind类快速构建UI组件</h2> <p>利用Tailwind丰富的原子类系统,可以直接在HTML标签上组合样式类,快速搭建响应式布局。</p> <p>1、为按钮添加类如 <strong><font color="green">bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded</font></strong> 实现美观的视觉效果。</p> <p>2、使用 flex、grid 等布局类快速组织内容结构。</p> <p>3、结合响应式前缀如 md:、lg: 调整不同屏幕尺寸下的显示行为。</p><p>以上就是本文的全部内容了,是否有顺利帮助你解决问题?若是能给你带来学习上的帮助,请大家多多支持golang学习网!更多关于文章的相关知识,也可关注golang学习网公众号。</p> </div> <div class="labsList"> <a href="javascript:;" title="html">html</a> <a href="javascript:;" title="UI">UI</a> <a href="javascript:;" title="TailwindCSS">TailwindCSS</a> <a href="javascript:;" title="实用类">实用类</a> <a href="javascript:;" title="配置编译">配置编译</a> </div> <div class="cateBox"> <div class="cateItem"> <a href="/article/365083.html" title="探探App数据查看技巧与使用统计解析" class="img_box"> <img src="/uploads/20251029/176175075469022ee2c97e3.jpg" onerror="this.onerror='',this.src='/assets/images/moren/morentu.png'" alt="探探App数据查看技巧与使用统计解析">探探App数据查看技巧与使用统计解析 </a> <dl> <dt class="lineOverflow"><a href="/article/365083.html" title="探探App数据查看技巧与使用统计解析" class="aBlack">上一篇<i></i></a></dt> <dd class="lineTwoOverflow">探探App数据查看技巧与使用统计解析</dd> </dl> </div> <div class="cateItem"> <a href="/article/365085.html" title="高阶函数提升代码抽象与复用技巧" class="img_box"> <img src="/uploads/20251029/176175086869022f5476941.png" onerror="this.onerror='',this.src='/assets/images/moren/morentu.png'" alt="高阶函数提升代码抽象与复用技巧"> </a> <dl> <dt class="lineOverflow"><a href="/article/365085.html" class="aBlack" title="高阶函数提升代码抽象与复用技巧">下一篇<i></i></a></dt> <dd class="lineTwoOverflow">高阶函数提升代码抽象与复用技巧</dd> </dl> </div> </div> </div> </div> <div class="leftContBox pt0"> <div class="pdl20"> <div class="contTit"> <a href="/articlelist.html" class="more" title="查看更多">查看更多<i class="iconfont"></i></a> <div class="tit">最新文章</div> </div> </div> <ul class="newArticleList"> <li> <div class="contBox"> <a href="/article/627708.html" class="img_box" title="CSS scroll snap让横向卡片滚动停在卡片边界的实现方法"> <img src="/uploads/20260916/1789490548-f2e72797df-b9a1a41149-cover-640.webp" onerror="this.src='/assets/images/moren/morentu.png'" alt="CSS scroll snap让横向卡片滚动停在卡片边界的实现方法"> </a> <dl> <dd class="cont1"> <span> <a href="/articlelist/19_new_0_1.html" class="aLightGray" title="文章">文章</a> · <a href="/articlelist/88_new_0_1.html" class="aLightGray" title="前端">前端</a>   |  21小时前  |   <a href="/articletag/40049_new_0_1.html" class="aLightGray" title="前端交互">前端交互</a> · <a href="/articletag/42737_new_0_1.html" class="aLightGray" title="CSS布局">CSS布局</a> · <a href="/articletag/44955_new_0_1.html" class="aLightGray" title="横向滚动">横向滚动</a> · <a href="/articletag/44956_new_0_1.html" class="aLightGray" title="移动端体验">移动端体验</a> · <a href="/articletag/44957_new_0_1.html" class="aLightGray" title="Scroll Snap">Scroll Snap</a> · <a href="javascript:;" class="aLightGray" title="scroll-snap-type">scroll-snap-type</a> <a href="javascript:;" class="aLightGray" title="scroll-snap-align">scroll-snap-align</a> <a href="javascript:;" class="aLightGray" title="CSS scroll snap">CSS scroll snap</a> <a href="javascript:;" class="aLightGray" title="横向卡片滚动">横向卡片滚动</a> <a href="javascript:;" class="aLightGray" title="前端卡片边界对齐">前端卡片边界对齐</a> </span> </dd> <dt class="lineOverflow"> <a href="/article/627708.html" class="aBlack" target="_blank" title="CSS scroll snap让横向卡片滚动停在卡片边界的实现方法">CSS scroll snap让横向卡片滚动停在卡片边界的实现方法</a> </dt> <dd class="cont2"> <span><i class="view"></i>403浏览</span> <span class="collectBtn user_collection" data-id="627708" data-type="article" title="收藏"><i class="collect"></i>收藏</span> </dd> </dl> </div> </li> <li> <div class="contBox"> <a href="/article/627677.html" class="img_box" title="CSS container queries按容器宽度切换组件布局的实现方法"> <img src="/uploads/20260915/1789486026-eb6036be0d-dd221fc498-cover-640.webp" onerror="this.src='/assets/images/moren/morentu.png'" alt="CSS container queries按容器宽度切换组件布局的实现方法"> </a> <dl> <dd class="cont1"> <span> <a href="/articlelist/19_new_0_1.html" class="aLightGray" title="文章">文章</a> · <a href="/articlelist/88_new_0_1.html" class="aLightGray" title="前端">前端</a>   |  22小时前  |   <a href="/articletag/243_new_0_1.html" class="aLightGray" title="前端">前端</a> · <a href="/articletag/4729_new_0_1.html" class="aLightGray" title="css">css</a> · <a href="/articletag/40475_new_0_1.html" class="aLightGray" title="响应式布局">响应式布局</a> · <a href="javascript:;" class="aLightGray" title="CSS">CSS</a> <a href="javascript:;" class="aLightGray" title="响应式布局">响应式布局</a> <a href="javascript:;" class="aLightGray" title="container queries">container queries</a> <a href="javascript:;" class="aLightGray" title="container-type">container-type</a> <a href="javascript:;" class="aLightGray" title="@container">@container</a> </span> </dd> <dt class="lineOverflow"> <a href="/article/627677.html" class="aBlack" target="_blank" title="CSS container queries按容器宽度切换组件布局的实现方法">CSS container queries按容器宽度切换组件布局的实现方法</a> </dt> <dd class="cont2"> <span><i class="view"></i>387浏览</span> <span class="collectBtn user_collection" data-id="627677" data-type="article" title="收藏"><i class="collect"></i>收藏</span> </dd> </dl> </div> </li> <li> <div class="contBox"> <a href="/article/627647.html" class="img_box" title="Fetch AbortController传递取消原因并区分异常来源的实现方法"> <img src="/uploads/20260915/1789481525-6e08f82d09-0c7cd6bda5-cover-640.webp" onerror="this.src='/assets/images/moren/morentu.png'" alt="Fetch AbortController传递取消原因并区分异常来源的实现方法"> </a> <dl> <dd class="cont1"> <span> <a href="/articlelist/19_new_0_1.html" class="aLightGray" title="文章">文章</a> · <a href="/articlelist/88_new_0_1.html" class="aLightGray" title="前端">前端</a>   |  23小时前  |   <a href="/articletag/243_new_0_1.html" class="aLightGray" title="前端">前端</a> · <a href="/articletag/4701_new_0_1.html" class="aLightGray" title="javascript">javascript</a> · <a href="/articletag/40974_new_0_1.html" class="aLightGray" title="Fetch API">Fetch API</a> · <a href="/articletag/43076_new_0_1.html" class="aLightGray" title="异步取消">异步取消</a> · <a href="javascript:;" class="aLightGray" title="AbortController">AbortController</a> <a href="javascript:;" class="aLightGray" title="AbortSignal">AbortSignal</a> <a href="javascript:;" class="aLightGray" title="Fetch API">Fetch API</a> <a href="javascript:;" class="aLightGray" title="abort reason">abort reason</a> </span> </dd> <dt class="lineOverflow"> <a href="/article/627647.html" class="aBlack" target="_blank" title="Fetch AbortController传递取消原因并区分异常来源的实现方法">Fetch AbortController传递取消原因并区分异常来源的实现方法</a> </dt> <dd class="cont2"> <span><i class="view"></i>351浏览</span> <span class="collectBtn user_collection" data-id="627647" data-type="article" title="收藏"><i class="collect"></i>收藏</span> </dd> </dl> </div> </li> <li> <div class="contBox"> <a href="/article/627617.html" class="img_box" title="Service Worker设计缓存失败后的网络回退的实现方法"> <img src="/uploads/20260915/1789477377-5a110ad71a-3d9f0fd869-cover-640.webp" onerror="this.src='/assets/images/moren/morentu.png'" alt="Service Worker设计缓存失败后的网络回退的实现方法"> </a> <dl> <dd class="cont1"> <span> <a href="/articlelist/19_new_0_1.html" class="aLightGray" title="文章">文章</a> · <a href="/articlelist/88_new_0_1.html" class="aLightGray" title="前端">前端</a>   |  1天前  |   <a href="/articletag/10234_new_0_1.html" class="aLightGray" title="pwa">pwa</a> · <a href="/articletag/14161_new_0_1.html" class="aLightGray" title="fetch">fetch</a> · <a href="/articletag/14884_new_0_1.html" class="aLightGray" title="Service Worker">Service Worker</a> · <a href="/articletag/42873_new_0_1.html" class="aLightGray" title="前端缓存">前端缓存</a> · <a href="/articletag/44850_new_0_1.html" class="aLightGray" title="离线回退">离线回退</a> · <a href="javascript:;" class="aLightGray" title="离线缓存">离线缓存</a> <a href="javascript:;" class="aLightGray" title="fetch事件">fetch事件</a> <a href="javascript:;" class="aLightGray" title="Service Worker">Service Worker</a> <a href="javascript:;" class="aLightGray" title="caches.match">caches.match</a> <a href="javascript:;" class="aLightGray" title="event.respondWith">event.respondWith</a> <a href="javascript:;" class="aLightGray" title="网络回退">网络回退</a> </span> </dd> <dt class="lineOverflow"> <a href="/article/627617.html" class="aBlack" target="_blank" title="Service Worker设计缓存失败后的网络回退的实现方法">Service Worker设计缓存失败后的网络回退的实现方法</a> </dt> <dd class="cont2"> <span><i class="view"></i>448浏览</span> <span class="collectBtn user_collection" data-id="627617" data-type="article" title="收藏"><i class="collect"></i>收藏</span> </dd> </dl> </div> </li> <li> <div class="contBox"> <a href="/article/627586.html" class="img_box" title="Cache API用 match 选项控制查询参数是否参与缓存键的实现方法"> <img src="/uploads/20260915/1789472865-2f3eb10c27-d59e1c1f0f-cover-640.webp" onerror="this.src='/assets/images/moren/morentu.png'" alt="Cache API用 match 选项控制查询参数是否参与缓存键的实现方法"> </a> <dl> <dd class="cont1"> <span> <a href="/articlelist/19_new_0_1.html" class="aLightGray" title="文章">文章</a> · <a href="/articlelist/88_new_0_1.html" class="aLightGray" title="前端">前端</a>   |  1天前  |   <a href="/articletag/243_new_0_1.html" class="aLightGray" title="前端">前端</a> · <a href="/articletag/10234_new_0_1.html" class="aLightGray" title="pwa">pwa</a> · <a href="/articletag/14884_new_0_1.html" class="aLightGray" title="Service Worker">Service Worker</a> · <a href="/articletag/39924_new_0_1.html" class="aLightGray" title="浏览器缓存">浏览器缓存</a> · <a href="javascript:;" class="aLightGray" title="Service Worker">Service Worker</a> <a href="javascript:;" class="aLightGray" title="Cache API">Cache API</a> <a href="javascript:;" class="aLightGray" title="Cache.match">Cache.match</a> <a href="javascript:;" class="aLightGray" title="ignoreSearch">ignoreSearch</a> <a href="javascript:;" class="aLightGray" title="前端缓存">前端缓存</a> </span> </dd> <dt class="lineOverflow"> <a href="/article/627586.html" class="aBlack" target="_blank" title="Cache API用 match 选项控制查询参数是否参与缓存键的实现方法">Cache API用 match 选项控制查询参数是否参与缓存键的实现方法</a> </dt> <dd class="cont2"> <span><i class="view"></i>409浏览</span> <span class="collectBtn user_collection" data-id="627586" data-type="article" title="收藏"><i class="collect"></i>收藏</span> </dd> </dl> </div> </li> <li> <div class="contBox"> <a href="/article/627554.html" class="img_box" title="CSS scroll anchoring 造成滚动跳动时如何关闭"> <img src="/uploads/20260915/1789466496-816127e076-43c245c8b3-cover-640.webp" onerror="this.src='/assets/images/moren/morentu.png'" alt="CSS scroll anchoring 造成滚动跳动时如何关闭"> </a> <dl> <dd class="cont1"> <span> <a href="/articlelist/19_new_0_1.html" class="aLightGray" title="文章">文章</a> · <a href="/articlelist/88_new_0_1.html" class="aLightGray" title="前端">前端</a>   |  1天前  |   </span> </dd> <dt class="lineOverflow"> <a href="/article/627554.html" class="aBlack" target="_blank" title="CSS scroll anchoring 造成滚动跳动时如何关闭">CSS scroll anchoring 造成滚动跳动时如何关闭</a> </dt> <dd class="cont2"> <span><i class="view"></i>313浏览</span> <span class="collectBtn user_collection" data-id="627554" data-type="article" title="收藏"><i class="collect"></i>收藏</span> </dd> </dl> </div> </li> <li> <div class="contBox"> <a href="/article/627539.html" class="img_box" title="浏览器 Cache API 更新资源时如何清理旧版本"> <img src="/uploads/20260915/1789464238-1ae514be91-5b55ef1083-cover-640.webp" onerror="this.src='/assets/images/moren/morentu.png'" alt="浏览器 Cache API 更新资源时如何清理旧版本"> </a> <dl> <dd class="cont1"> <span> <a href="/articlelist/19_new_0_1.html" class="aLightGray" title="文章">文章</a> · <a href="/articlelist/88_new_0_1.html" class="aLightGray" title="前端">前端</a>   |  1天前  |   <a href="/articletag/243_new_0_1.html" class="aLightGray" title="前端">前端</a> · <a href="/articletag/14884_new_0_1.html" class="aLightGray" title="Service Worker">Service Worker</a> · <a href="/articletag/39924_new_0_1.html" class="aLightGray" title="浏览器缓存">浏览器缓存</a> · <a href="javascript:;" class="aLightGray" title="浏览器">浏览器</a> <a href="javascript:;" class="aLightGray" title="缓存更新">缓存更新</a> <a href="javascript:;" class="aLightGray" title="Service Worker">Service Worker</a> <a href="javascript:;" class="aLightGray" title="Cache API">Cache API</a> </span> </dd> <dt class="lineOverflow"> <a href="/article/627539.html" class="aBlack" target="_blank" title="浏览器 Cache API 更新资源时如何清理旧版本">浏览器 Cache API 更新资源时如何清理旧版本</a> </dt> <dd class="cont2"> <span><i class="view"></i>220浏览</span> <span class="collectBtn user_collection" data-id="627539" data-type="article" title="收藏"><i class="collect"></i>收藏</span> </dd> </dl> </div> </li> <li> <div class="contBox"> <a href="/article/627511.html" class="img_box" title="React key 使用数组索引时哪些更新会错位"> <img src="/uploads/20260915/1789459913-9c60013e35-8ff8e8a398-cover-640.webp" onerror="this.src='/assets/images/moren/morentu.png'" alt="React key 使用数组索引时哪些更新会错位"> </a> <dl> <dd class="cont1"> <span> <a href="/articlelist/19_new_0_1.html" class="aLightGray" title="文章">文章</a> · <a href="/articlelist/88_new_0_1.html" class="aLightGray" title="前端">前端</a>   |  1天前  |   </span> </dd> <dt class="lineOverflow"> <a href="/article/627511.html" class="aBlack" target="_blank" title="React key 使用数组索引时哪些更新会错位">React key 使用数组索引时哪些更新会错位</a> </dt> <dd class="cont2"> <span><i class="view"></i>264浏览</span> <span class="collectBtn user_collection" data-id="627511" data-type="article" title="收藏"><i class="collect"></i>收藏</span> </dd> </dl> </div> </li> <li> <div class="contBox"> <a href="/article/627480.html" class="img_box" title="TypeScript satisfies 在泛型返回值中如何保留字面量"> <img src="/uploads/20260915/1789455159-71f73d3332-0dc710a4c9-cover-640.webp" onerror="this.src='/assets/images/moren/morentu.png'" alt="TypeScript satisfies 在泛型返回值中如何保留字面量"> </a> <dl> <dd class="cont1"> <span> <a href="/articlelist/19_new_0_1.html" class="aLightGray" title="文章">文章</a> · <a href="/articlelist/88_new_0_1.html" class="aLightGray" title="前端">前端</a>   |  1天前  |   </span> </dd> <dt class="lineOverflow"> <a href="/article/627480.html" class="aBlack" target="_blank" title="TypeScript satisfies 在泛型返回值中如何保留字面量">TypeScript satisfies 在泛型返回值中如何保留字面量</a> </dt> <dd class="cont2"> <span><i class="view"></i>368浏览</span> <span class="collectBtn user_collection" data-id="627480" data-type="article" title="收藏"><i class="collect"></i>收藏</span> </dd> </dl> </div> </li> <li> <div class="contBox"> <a href="/article/627449.html" class="img_box" title="Vite 环境变量前缀不生效时如何区分模式"> <img src="/uploads/20260915/1789450464-c9e2bb1afe-209524b2d2-cover-640.webp" onerror="this.src='/assets/images/moren/morentu.png'" alt="Vite 环境变量前缀不生效时如何区分模式"> </a> <dl> <dd class="cont1"> <span> <a href="/articlelist/19_new_0_1.html" class="aLightGray" title="文章">文章</a> · <a href="/articlelist/88_new_0_1.html" class="aLightGray" title="前端">前端</a>   |  1天前  |   </span> </dd> <dt class="lineOverflow"> <a href="/article/627449.html" class="aBlack" target="_blank" title="Vite 环境变量前缀不生效时如何区分模式">Vite 环境变量前缀不生效时如何区分模式</a> </dt> <dd class="cont2"> <span><i class="view"></i>196浏览</span> <span class="collectBtn user_collection" data-id="627449" data-type="article" title="收藏"><i class="collect"></i>收藏</span> </dd> </dl> </div> </li> <li> <div class="contBox"> <a href="/article/627424.html" class="img_box" title="ResizeObserver 如何只观察可见组件避免重复计算"> <img src="/uploads/20260915/1789446068-9a5166bf28-20321d5b41-cover-360.webp" onerror="this.src='/assets/images/moren/morentu.png'" alt="ResizeObserver 如何只观察可见组件避免重复计算"> </a> <dl> <dd class="cont1"> <span> <a href="/articlelist/19_new_0_1.html" class="aLightGray" title="文章">文章</a> · <a href="/articlelist/88_new_0_1.html" class="aLightGray" title="前端">前端</a>   |  1天前  |   <a href="/articletag/4701_new_0_1.html" class="aLightGray" title="javascript">javascript</a> · <a href="/articletag/39768_new_0_1.html" class="aLightGray" title="前端性能">前端性能</a> · <a href="/articletag/39812_new_0_1.html" class="aLightGray" title="IntersectionObserver">IntersectionObserver</a> · <a href="/articletag/40440_new_0_1.html" class="aLightGray" title="ResizeObserver">ResizeObserver</a> · <a href="javascript:;" class="aLightGray" title="IntersectionObserver">IntersectionObserver</a> <a href="javascript:;" class="aLightGray" title="ResizeObserver">ResizeObserver</a> <a href="javascript:;" class="aLightGray" title="前端性能">前端性能</a> <a href="javascript:;" class="aLightGray" title="长列表">长列表</a> </span> </dd> <dt class="lineOverflow"> <a href="/article/627424.html" class="aBlack" target="_blank" title="ResizeObserver 如何只观察可见组件避免重复计算">ResizeObserver 如何只观察可见组件避免重复计算</a> </dt> <dd class="cont2"> <span><i class="view"></i>373浏览</span> <span class="collectBtn user_collection" data-id="627424" data-type="article" title="收藏"><i class="collect"></i>收藏</span> </dd> </dl> </div> </li> <li> <div class="contBox"> <a href="/article/627400.html" class="img_box" title="IntersectionObserver 观察大量元素时如何拆分"> <img src="/uploads/20260915/1789441726-266e15840c-258815fa1d-cover-360.webp" onerror="this.src='/assets/images/moren/morentu.png'" alt="IntersectionObserver 观察大量元素时如何拆分"> </a> <dl> <dd class="cont1"> <span> <a href="/articlelist/19_new_0_1.html" class="aLightGray" title="文章">文章</a> · <a href="/articlelist/88_new_0_1.html" class="aLightGray" title="前端">前端</a>   |  1天前  |   <a href="/articletag/2774_new_0_1.html" class="aLightGray" title="dom">dom</a> · <a href="/articletag/4701_new_0_1.html" class="aLightGray" title="javascript">javascript</a> · <a href="/articletag/39768_new_0_1.html" class="aLightGray" title="前端性能">前端性能</a> · <a href="/articletag/39812_new_0_1.html" class="aLightGray" title="IntersectionObserver">IntersectionObserver</a> · <a href="javascript:;" class="aLightGray" title="JavaScript">JavaScript</a> <a href="javascript:;" class="aLightGray" title="IntersectionObserver">IntersectionObserver</a> <a href="javascript:;" class="aLightGray" title="前端性能">前端性能</a> </span> </dd> <dt class="lineOverflow"> <a href="/article/627400.html" class="aBlack" target="_blank" title="IntersectionObserver 观察大量元素时如何拆分">IntersectionObserver 观察大量元素时如何拆分</a> </dt> <dd class="cont2"> <span><i class="view"></i>276浏览</span> <span class="collectBtn user_collection" data-id="627400" data-type="article" title="收藏"><i class="collect"></i>收藏</span> </dd> </dl> </div> </li> </ul> </div> </div> <div class="mainRight"> <!-- 右侧广告位banner --> <div class="rightContBox" style="margin-top: 0px;"> <div class="rightTit"> <a href="/courselist.html" class="more" title="查看更多">查看更多<i class="iconfont"></i></a> <div class="tit lineOverflow">课程推荐</div> </div> <ul class="lessonRecomRList"> <li> <a href="/course/9.html" class="img_box" target="_blank" title="前端进阶之JavaScript设计模式"> <img src="/uploads/20221222/52fd0f23a454c71029c2c72d206ed815.jpg" onerror="this.onerror='',this.src='/assets/images/moren/morentu.png'" alt="前端进阶之JavaScript设计模式"> </a> <dl> <dt class="lineTwoOverflow"><a href="/course/9.html" target="_blank" class="aBlack" title="前端进阶之JavaScript设计模式">前端进阶之JavaScript设计模式</a></dt> <dd class="cont1 lineTwoOverflow"> 设计模式是开发人员在软件开发过程中面临一般问题时的解决方案,代表了最佳的实践。本课程的主打内容包括JS常见设计模式以及具体应用场景,打造一站式知识长龙服务,适合有JS基础的同学学习。 </dd> <dd class="cont2">543次学习</dd> </dl> </li> <li> <a href="/course/2.html" class="img_box" target="_blank" title="GO语言核心编程课程"> <img src="/uploads/20221221/634ad7404159bfefc6a54a564d437b5f.png" onerror="this.onerror='',this.src='/assets/images/moren/morentu.png'" alt="GO语言核心编程课程"> </a> <dl> <dt class="lineTwoOverflow"><a href="/course/2.html" target="_blank" class="aBlack" title="GO语言核心编程课程">GO语言核心编程课程</a></dt> <dd class="cont1 lineTwoOverflow"> 本课程采用真实案例,全面具体可落地,从理论到实践,一步一步将GO核心编程技术、编程思想、底层实现融会贯通,使学习者贴近时代脉搏,做IT互联网时代的弄潮儿。 </dd> <dd class="cont2">516次学习</dd> </dl> </li> <li> <a href="/course/74.html" class="img_box" target="_blank" title="简单聊聊mysql8与网络通信"> <img src="/uploads/20240103/bad35fe14edbd214bee16f88343ac57c.png" onerror="this.onerror='',this.src='/assets/images/moren/morentu.png'" alt="简单聊聊mysql8与网络通信"> </a> <dl> <dt class="lineTwoOverflow"><a href="/course/74.html" target="_blank" class="aBlack" title="简单聊聊mysql8与网络通信">简单聊聊mysql8与网络通信</a></dt> <dd class="cont1 lineTwoOverflow"> 如有问题加微信:Le-studyg;在课程中,我们将首先介绍MySQL8的新特性,包括性能优化、安全增强、新数据类型等,帮助学生快速熟悉MySQL8的最新功能。接着,我们将深入解析MySQL的网络通信机制,包括协议、连接管理、数据传输等,让 </dd> <dd class="cont2">500次学习</dd> </dl> </li> <li> <a href="/course/57.html" class="img_box" target="_blank" title="JavaScript正则表达式基础与实战"> <img src="/uploads/20221226/bbe4083bb3cb0dd135fb02c31c3785fb.jpg" onerror="this.onerror='',this.src='/assets/images/moren/morentu.png'" alt="JavaScript正则表达式基础与实战"> </a> <dl> <dt class="lineTwoOverflow"><a href="/course/57.html" target="_blank" class="aBlack" title="JavaScript正则表达式基础与实战">JavaScript正则表达式基础与实战</a></dt> <dd class="cont1 lineTwoOverflow"> 在任何一门编程语言中,正则表达式,都是一项重要的知识,它提供了高效的字符串匹配与捕获机制,可以极大的简化程序设计。 </dd> <dd class="cont2">487次学习</dd> </dl> </li> <li> <a href="/course/28.html" class="img_box" target="_blank" title="从零制作响应式网站—Grid布局"> <img src="/uploads/20221223/ac110f88206daeab6c0cf38ebf5fe9ed.jpg" onerror="this.onerror='',this.src='/assets/images/moren/morentu.png'" alt="从零制作响应式网站—Grid布局"> </a> <dl> <dt class="lineTwoOverflow"><a href="/course/28.html" target="_blank" class="aBlack" title="从零制作响应式网站—Grid布局">从零制作响应式网站—Grid布局</a></dt> <dd class="cont1 lineTwoOverflow"> 本系列教程将展示从零制作一个假想的网络科技公司官网,分为导航,轮播,关于我们,成功案例,服务流程,团队介绍,数据部分,公司动态,底部信息等内容区块。网站整体采用CSSGrid布局,支持响应式,有流畅过渡和展现动画。 </dd> <dd class="cont2">485次学习</dd> </dl> </li> </ul> </div> <div class="rightContBox"> <div class="rightTit"> <a href="/ai.html" class="more" title="查看更多">查看更多<i class="iconfont"></i></a> <div class="tit lineOverflow">AI推荐</div> </div> <ul class="lessonRecomRList"> <li> <a href="/ai/13900.html" target="_blank" title="PubMedQA数据集详解:生物医学问答基准、功能与应用指南" class="img_box"> <img src="/uploads/20260908/6a9f83280940e7.65575695.jpg" onerror="this.onerror='',this.src='/assets/images/moren/morentu.png'" alt="PubMedQA数据集详解:生物医学问答基准、功能与应用指南" style="object-fit:cover;width:100%;height:100%;"> </a> <dl> <dt class="lineTwoOverflow"><a href="/ai/13900.html" class="aBlack" target="_blank" title="PubMedQA">PubMedQA</a></dt> <dd class="cont1 lineTwoOverflow"> 深入了解PubMedQA生物医学问答数据集,涵盖其核心功能、使用方法及在临床决策、药物研发等场景的应用,助力提升NLP模型性能。 </dd> <dd class="cont2">54次使用</dd> </dl> </li> <li> <a href="/ai/13899.html" target="_blank" title="H2O EvalGPT:开源LLM大模型评估与排行榜工具" class="img_box"> <img src="/uploads/20260908/17887986376a9ee6adaf3f5.jpg" onerror="this.onerror='',this.src='/assets/images/moren/morentu.png'" alt="H2O EvalGPT:开源LLM大模型评估与排行榜工具" style="object-fit:cover;width:100%;height:100%;"> </a> <dl> <dt class="lineTwoOverflow"><a href="/ai/13899.html" class="aBlack" target="_blank" title="H2O EvalGPT">H2O EvalGPT</a></dt> <dd class="cont1 lineTwoOverflow"> H2O EvalGPT是H2O.ai推出的开源LLM评估平台,提供详细的大模型性能排行榜、行业特定基准测试及A/B测试功能,助您快速选择最适合项目的高性能大语言模型。 </dd> <dd class="cont2">151次使用</dd> </dl> </li> <li> <a href="/ai/13898.html" target="_blank" title="LMArena是什么?伯克利AI模型评估平台使用指南与功能解析" class="img_box"> <img src="/uploads/20260908/6a9f862dbcfec7.27385604.jpg" onerror="this.onerror='',this.src='/assets/images/moren/morentu.png'" alt="LMArena是什么?伯克利AI模型评估平台使用指南与功能解析" style="object-fit:cover;width:100%;height:100%;"> </a> <dl> <dt class="lineTwoOverflow"><a href="/ai/13898.html" class="aBlack" target="_blank" title="LMArena">LMArena</a></dt> <dd class="cont1 lineTwoOverflow"> LMArena是加州大学伯克利分校推出的AI模型匿名评测平台。通过盲测投票机制,用户可对比不同大模型回答并生成实时排行榜,助力开发者优化模型及用户选择最佳AI工具。 </dd> <dd class="cont2">91次使用</dd> </dl> </li> <li> <a href="/ai/13897.html" target="_blank" title="斯坦福HELM:大语言模型Holistic Evaluation整体评估框架详解" class="img_box"> <img src="/uploads/20260908/6a9f86b31ed789.06773114.jpg" onerror="this.onerror='',this.src='/assets/images/moren/morentu.png'" alt="斯坦福HELM:大语言模型Holistic Evaluation整体评估框架详解" style="object-fit:cover;width:100%;height:100%;"> </a> <dl> <dt class="lineTwoOverflow"><a href="/ai/13897.html" class="aBlack" target="_blank" title="HELM">HELM</a></dt> <dd class="cont1 lineTwoOverflow"> 深入了解斯坦福推出的HELM(Holistic Evaluation of Language Models)大模型评测体系。本文解析其核心功能、安装配置步骤及应用场景,涵盖准确性、公平性、鲁棒性等多维度指标,助力开发者全面优化语言模型性能。 </dd> <dd class="cont2">60次使用</dd> </dl> </li> <li> <a href="/ai/13895.html" target="_blank" title="CMMLU中文大模型评估基准:功能、使用教程与应用场景解析" class="img_box"> <img src="/uploads/20260908/6a9f86da34b3c3.73649809.jpg" onerror="this.onerror='',this.src='/assets/images/moren/morentu.png'" alt="CMMLU中文大模型评估基准:功能、使用教程与应用场景解析" style="object-fit:cover;width:100%;height:100%;"> </a> <dl> <dt class="lineTwoOverflow"><a href="/ai/13895.html" class="aBlack" target="_blank" title="CMMLU">CMMLU</a></dt> <dd class="cont1 lineTwoOverflow"> 深入了解CMMLU中文评估基准,涵盖67个学科主题,提供数据集下载、Zero-shot/Five-shot评估方法及排行榜,助力优化中文语言模型性能。 </dd> <dd class="cont2">37次使用</dd> </dl> </li> </ul> </div> <!-- 相关文章 --> <div class="rightContBox"> <div class="rightTit"> <a href="/articlelist.html" class="more" title="查看更多">查看更多<i class="iconfont"></i></a> <div class="tit lineOverflow">相关文章</div> </div> <ul class="aboutArticleRList"> <li> <dl> <dt class="lineTwoOverflow"><a href="/article/207000.html" class="aBlack" title="JavaScript函数定义及示例详解">JavaScript函数定义及示例详解</a></dt> <dd> <span class="left">2025-05-11</span> <span class="right">502浏览</span> </dd> </dl> </li> <li> <dl> <dt class="lineTwoOverflow"><a href="/article/621422.html" class="aBlack" title="智能体安全引领产业升级——国内AI安全产品市场深度分析">智能体安全引领产业升级——国内AI安全产品市场深度分析</a></dt> <dd> <span class="left">2026-08-21</span> <span class="right">501浏览</span> </dd> </dl> </li> <li> <dl> <dt class="lineTwoOverflow"><a href="/article/619053.html" class="aBlack" title="CSS变量简化按钮悬停效果技巧">CSS变量简化按钮悬停效果技巧</a></dt> <dd> <span class="left">2026-05-31</span> <span class="right">501浏览</span> </dd> </dl> </li> <li> <dl> <dt class="lineTwoOverflow"><a href="/article/618916.html" class="aBlack" title="JavaScript符号类型详解与应用">JavaScript符号类型详解与应用</a></dt> <dd> <span class="left">2026-05-31</span> <span class="right">501浏览</span> </dd> </dl> </li> <li> <dl> <dt class="lineTwoOverflow"><a href="/article/612539.html" class="aBlack" title="HTML剪贴板复制粘贴怎么用">HTML剪贴板复制粘贴怎么用</a></dt> <dd> <span class="left">2026-05-26</span> <span class="right">501浏览</span> </dd> </dl> </li> </ul> </div> </div> </div> <div class="footer"> <div class="footerIn"> <div class="footLeft"> <div class="linkBox"> <a href="/about/1.html" target="_blank" class="aBlack" title="关于我们">关于我们</a> <a href="/about/5.html" target="_blank" class="aBlack" title="免责声明">免责声明</a> <a href="#" class="aBlack" title="意见反馈">意见反馈</a> <a href="/about/2.html" class="aBlack" target="_blank" title="联系我们">联系我们</a> <a href="/send.html" class="aBlack" title="广告合作">内容提交</a> <a href="/manual/go/" target="_blank" class="aBlack" title="手册">手册</a> </div> <div class="footTip">Golang学习网:公益在线Go学习平台,帮助Go学习者快速成长!</div> <div class="shareBox"> <span><i class="qq"></i>技术交流群</span> </div> <div class="copyRight"> Copyright 2023 http://www.17golang.com/ All Rights Reserved | <a href="https://beian.miit.gov.cn/" target="_blank" title="备案">湘ICP备19018815号-4</a> </div> </div> <div class="footRight"> <ul class="encodeList"> <li> <div class="encodeImg"> <img src="/assets/examples/qrcode_for_gh.jpg" alt="Golang学习网"> </div> <div class="tit">关注公众号</div> <div class="tip">Golang学习网</div> </li> <div class="clear"></div> </ul> </div> <div class="clear"></div> </div> </div> <!-- 微信登录弹窗 --> <style> .popupBg .n-error{ color: red; } </style> <div class="popupBg"> <div class="loginBoxBox"> <div class="imgbg"> <img src="/assets/images/leftlogo.jpg" alt=""> </div> <!-- 微信登录 --> <div class="loginInfo encodeLogin" style="display: none;"> <div class="closeIcon" onclick="$('.popupBg').hide();"></div> <div class="changeLoginType cursorPointer create_wxqrcode" onclick="$('.loginInfo').hide();$('.passwordLogin').show();"> <div class="tip">密码登录在这里</div> </div> <div class="encodeInfo"> <div class="tit"><i></i> 微信扫码登录或注册</div> <div class="encodeImg"> <span id="wx_login_qrcode"><img src="/assets/examples/code.png" alt="二维码"></span> <!-- <div class="refreshBox"> <p>二维码失效</p> <button type="button" class="create_wxqrcode">刷新1111</button> </div> --> </div> <div class="tip">打开微信扫一扫,快速登录/注册</div> </div> <div class="beforeLoginTip">登录即同意 <a href="#" class="aBlue" title="用户协议">用户协议</a> 和 <a href="#" class="aBlue" title="隐私政策">隐私政策</a></div> </div> <!-- 密码登录 --> <div class="loginInfo passwordLogin"> <div class="closeIcon" onclick="$('.popupBg').hide();"></div> <div class="changeLoginType cursorPointer create_wxqrcode" onclick="$('.loginInfo').hide();$('.encodeLogin').show();"> <div class="tip">微信登录更方便</div> </div> <div class="passwordInfo"> <ul class="logintabs selfTabMenu"> <li class="selfTabItem loginFormLi curr">密码登录</li> <li class="selfTabItem registerFormBox ">注册账号</li> </ul> <div class="selfTabContBox"> <div class="selfTabCont loginFormBox" style="display: block;"> <form name="form" id="login-form" class="form-vertical form" method="POST" action="/index/user/login"> <input type="hidden" name="url" value="//www.17golang.com/article/365084.html"/> <input type="hidden" name="__token__" value="9b62a56b5d9c60140961c5b523111ac1" /> <div class="form-group" style="height:70px;"> <input class="form-control" id="account" type="text" name="account" value="" data-rule="required" placeholder="邮箱/用户名" autocomplete="off"> </div> <div class="form-group" style="height:70px;"> <input class="form-control" id="password" type="password" name="password" data-rule="required;password" placeholder="密码" autocomplete="off"> </div> <div class="codeBox" style="height:70px;"> <div class="form-group" style="height:70px; width:205px; float: left;"> <input type="text" name="captcha" class="form-control" placeholder="验证码" data-rule="required;length(4)" /> </div> <span class="input-group-btn" style="padding:0;border:none;"> <img src="/captcha.html" width="100" height="45" onclick="this.src = '/captcha.html?r=' + Math.random();"/> </span> </div> <div class="other"> <a href="#" class="forgetPwd aGray" onclick="$('.loginInfo').hide();$('.passwordForget').show();" title="忘记密码">忘记密码</a> </div> <div class="loginBtn mt25"> <button type="submit">登录</button> </div> </form> </div> <div class="selfTabCont registerFormBox" style="display: none;"> <form name="form1" id="register-form" class="form-vertical form" method="POST" action="/index/user/register"> <input type="hidden" name="invite_user_id" value="0"/> <input type="hidden" name="url" value="//www.17golang.com/article/365084.html"/> <input type="hidden" name="__token__" value="9b62a56b5d9c60140961c5b523111ac1" /> <div class="form-group" style="height:70px;"> <input type="text" name="email" id="email2" data-rule="required;email" class="form-control" placeholder="邮箱"> </div> <div class="form-group" style="height:70px;"> <input type="text" id="username" name="username" data-rule="required;username" class="form-control" placeholder="用户名必须3-30个字符"> </div> <div class="form-group" style="height:70px;"> <input type="password" id="password2" name="password" data-rule="required;password" class="form-control" placeholder="密码必须6-30个字符"> </div> <div class="codeBox" style="height:70px;"> <div class="form-group" style="height:70px; width:205px; float: left;"> <input type="text" name="captcha" class="form-control" placeholder="验证码" data-rule="required;length(4)" /> </div> <span class="input-group-btn" style="padding:0;border:none;"> <img src="/captcha.html" width="100" height="45" onclick="this.src = '/captcha.html?r=' + Math.random();"/> </span> </div> <div class="loginBtn"> <button type="submit">注册</button> </div> </form> </div> </div> </div> <div class="beforeLoginTip">登录即同意 <a href="https://www.17golang.com/about/3.html" target="_blank" class="aBlue" title="用户协议">用户协议</a> 和 <a href="https://www.17golang.com/about/4.html" target="_blank" class="aBlue" title="隐私政策">隐私政策</a></div> </div> <!-- 重置密码 --> <div class="loginInfo passwordForget"> <div class="closeIcon" onclick="$('.popupBg').hide();"></div> <div class="returnLogin cursorPointer" onclick="$('.passwordForget').hide();$('.passwordLogin').show();">返回登录</div> <div class="passwordInfo"> <ul class="logintabs selfTabMenu"> <li class="selfTabItem">重置密码</li> </ul> <div class="selfTabContBox"> <div class="selfTabCont"> <form id="resetpwd-form" class="form-horizontal form-layer nice-validator n-default n-bootstrap form" method="POST" action="/api/user/resetpwd.html" novalidate="novalidate"> <div style="height:70px;"> <input type="text" class="form-control" id="email" name="email" value="" placeholder="输入邮箱" aria-invalid="true"> </div> <div class="codeBox" style="height:70px;"> <div class="form-group" style="height:70px; width:205px; float: left;"> <input type="text" name="captcha" class="form-control" placeholder="验证码" /> </div> <span class="input-group-btn" style="padding:0;border:none;"> <a href="javascript:;" class="btn btn-primary btn-captcha cursorPointer" style="background: #2080F8; border-radius: 4px; color: #fff; padding: 12px; position: absolute;" data-url="/api/ems/send.html" data-type="email" data-event="resetpwd">发送验证码</a> </span> </div> <input type="password" class="form-control" id="newpassword" name="newpassword" value="" placeholder="请输入6-18位密码"> <div class="loginBtn mt25"> <button type="submit">重置密码</button> </div> </form> </div> </div> </div> </div> </div> </div> <script src="/assets/js/juejin-theme.js?v=20260613b" defer></script> <script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?e34c3e8ab31ba35d7e1c48ea8d77315f"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script> <script src="/assets/js/frontend/common.js"></script> </body> </html>