当前位置: 首页 > news >正文

集团网站开发免费发帖推广的平台

集团网站开发,免费发帖推广的平台,wordpress 主题css路径,淄博网站建设服务Bootstrap 5 列表组(List Group)语法知识点及案例 一、列表组基础语法 列表组是Bootstrap中用于显示一系列内容的灵活组件&#xff0c;常用于显示菜单、导航或任何项目列表。 基本列表组结构 <ul class"list-group"><li class"list-group-item&quo…

Bootstrap 5 列表组(List Group)语法知识点及案例

一、列表组基础语法

列表组是Bootstrap中用于显示一系列内容的灵活组件,常用于显示菜单、导航或任何项目列表。

基本列表组结构

<ul class="list-group"><li class="list-group-item">第一项</li><li class="list-group-item">第二项</li><li class="list-group-item">第三项</li>
</ul>

二、列表组样式选项

1. 激活和禁用状态

<ul class="list-group"><li class="list-group-item active" aria-current="true">激活项</li><li class="list-group-item disabled" aria-disabled="true">禁用项</li><li class="list-group-item">普通项</li>
</ul>

2. 颜色变体

Bootstrap 5提供了多种上下文颜色:

<ul class="list-group"><li class="list-group-item list-group-item-primary">主要项</li><li class="list-group-item list-group-item-secondary">次要项</li><li class="list-group-item list-group-item-success">成功项</li><li class="list-group-item list-group-item-danger">危险项</li><li class="list-group-item list-group-item-warning">警告项</li><li class="list-group-item list-group-item-info">信息项</li><li class="list-group-item list-group-item-light">浅色项</li><li class="list-group-item list-group-item-dark">深色项</li>
</ul>

3. 无边框列表组

<ul class="list-group list-group-flush"><li class="list-group-item">无边框项1</li><li class="list-group-item">无边框项2</li>
</ul>

三、列表组内容类型

1. 带徽章的列表组

<ul class="list-group"><li class="list-group-item d-flex justify-content-between align-items-center">收件箱<span class="badge bg-primary rounded-pill">12</span></li><li class="list-group-item d-flex justify-content-between align-items-center">垃圾邮件<span class="badge bg-danger rounded-pill">99+</span></li>
</ul>

2. 自定义内容

<div class="list-group"><a href="#" class="list-group-item list-group-item-action active"><div class="d-flex w-100 justify-content-between"><h5 class="mb-1">列表组标题</h5><small>3天前</small></div><p class="mb-1">这里是列表项的主要内容描述。</p><small>附加小文字说明</small></a><a href="#" class="list-group-item list-group-item-action"><div class="d-flex w-100 justify-content-between"><h5 class="mb-1">另一个标题</h5><small class="text-muted">昨天</small></div><p class="mb-1">另一个列表项的内容描述。</p><small class="text-muted">更多小文字</small></a>
</div>

3. 复选框和单选按钮列表组

<ul class="list-group"><li class="list-group-item"><input class="form-check-input me-1" type="checkbox" value="" id="firstCheckbox"><label class="form-check-label" for="firstCheckbox">第一选项</label></li><li class="list-group-item"><input class="form-check-input me-1" type="checkbox" value="" id="secondCheckbox"><label class="form-check-label" for="secondCheckbox">第二选项</label></li>
</ul>

四、列表组交互行为

1. 可点击的列表组

<div class="list-group"><a href="#" class="list-group-item list-group-item-action">可点击项1</a><a href="#" class="list-group-item list-group-item-action">可点击项2</a><a href="#" class="list-group-item list-group-item-action">可点击项3</a>
</div>

2. 水平列表组

<ul class="list-group list-group-horizontal"><li class="list-group-item">水平项1</li><li class="list-group-item">水平项2</li><li class="list-group-item">水平项3</li>
</ul>

五、综合案例代码

<!DOCTYPE html>
<html lang="zh-CN">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Bootstrap 5 列表组示例</title><!-- Bootstrap 5 CSS --><link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body><div class="container py-5"><h1 class="mb-4">Bootstrap 5 列表组示例</h1><!-- 示例1:基本列表组 --><div class="row mb-5"><div class="col-md-6"><h3>1. 基本列表组</h3><ul class="list-group"><li class="list-group-item">默认列表项</li><li class="list-group-item active">激活状态项</li><li class="list-group-item disabled">禁用状态项</li></ul></div><div class="col-md-6"><h3>2. 带徽章的列表组</h3><ul class="list-group"><li class="list-group-item d-flex justify-content-between align-items-center">未读消息<span class="badge bg-primary rounded-pill">14</span></li><li class="list-group-item d-flex justify-content-between align-items-center">待办事项<span class="badge bg-warning text-dark rounded-pill">5</span></li></ul></div></div><!-- 示例2:颜色变体和自定义内容 --><div class="row mb-5"><div class="col-md-6"><h3>3. 颜色变体列表组</h3><div class="list-group"><a href="#" class="list-group-item list-group-item-action list-group-item-primary">主要操作项</a><a href="#" class="list-group-item list-group-item-action list-group-item-success">成功操作项</a><a href="#" class="list-group-item list-group-item-action list-group-item-danger">危险操作项</a></div></div><div class="col-md-6"><h3>4. 自定义内容列表组</h3><div class="list-group"><a href="#" class="list-group-item list-group-item-action active" aria-current="true"><div class="d-flex w-100 justify-content-between"><h5 class="mb-1">最新公告</h5><small>今天</small></div><p class="mb-1">系统将于今晚12点进行维护升级,预计耗时2小时。</p><small>点击查看详情</small></a><a href="#" class="list-group-item list-group-item-action"><div class="d-flex w-100 justify-content-between"><h5 class="mb-1">产品更新</h5><small class="text-muted">3天前</small></div><p class="mb-1">我们发布了新版本v2.0,包含多项功能改进。</p><small class="text-muted">点击查看更新日志</small></a></div></div></div><!-- 示例3:交互式列表组 --><div class="row mb-5"><div class="col-md-6"><h3>5. 复选框列表组</h3><ul class="list-group"><li class="list-group-item"><input class="form-check-input me-1" type="checkbox" value="" id="option1" checked><label class="form-check-label" for="option1">电子邮件通知</label></li><li class="list-group-item"><input class="form-check-input me-1" type="checkbox" value="" id="option2"><label class="form-check-label" for="option2">短信通知</label></li><li class="list-group-item"><input class="form-check-input me-1" type="checkbox" value="" id="option3"><label class="form-check-label" for="option3">推送通知</label></li></ul></div><div class="col-md-6"><h3>6. 水平列表组</h3><ul class="list-group list-group-horizontal-md mb-3"><li class="list-group-item">首页</li><li class="list-group-item active">产品</li><li class="list-group-item">服务</li><li class="list-group-item">关于我们</li></ul><h3 class="mt-4">7. 无边框列表组</h3><ul class="list-group list-group-flush"><li class="list-group-item">设置</li><li class="list-group-item">账户</li><li class="list-group-item">隐私</li></ul></div></div></div><!-- Bootstrap 5 JS Bundle with Popper --><script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

六、关键点总结

  1. 基础结构:使用list-group作为容器,list-group-item作为列表项
  2. 状态控制activedisabled类控制项状态
  3. 颜色变体:通过list-group-item-*类设置不同颜色
  4. 交互增强:添加list-group-item-action使列表项可点击
  5. 内容扩展:可以在列表项中放置任意HTML内容
  6. 布局选项list-group-horizontal实现水平布局,list-group-flush移除边框

列表组是Bootstrap中非常灵活的组件,可以用于构建导航菜单、通知列表、设置面板等各种界面元素。通过组合不同的类和结构,可以实现丰富的视觉效果和交互体验。


文章转载自:
http://celebrated.qrqg.cn
http://codicillary.qrqg.cn
http://reecho.qrqg.cn
http://tapa.qrqg.cn
http://alvina.qrqg.cn
http://greyhound.qrqg.cn
http://stepladder.qrqg.cn
http://unheroical.qrqg.cn
http://understrapper.qrqg.cn
http://venite.qrqg.cn
http://epicoracoid.qrqg.cn
http://peevers.qrqg.cn
http://word.qrqg.cn
http://alphahelical.qrqg.cn
http://acoelous.qrqg.cn
http://ichorous.qrqg.cn
http://photoelectron.qrqg.cn
http://naphtali.qrqg.cn
http://wake.qrqg.cn
http://germinability.qrqg.cn
http://cancrivorous.qrqg.cn
http://phonoreceptor.qrqg.cn
http://reprobatively.qrqg.cn
http://snowy.qrqg.cn
http://embryoid.qrqg.cn
http://assyriologist.qrqg.cn
http://illuminative.qrqg.cn
http://density.qrqg.cn
http://mechanochemistry.qrqg.cn
http://bequest.qrqg.cn
http://drug.qrqg.cn
http://tamponage.qrqg.cn
http://headboard.qrqg.cn
http://chrysoprase.qrqg.cn
http://swashy.qrqg.cn
http://wherein.qrqg.cn
http://transtaafl.qrqg.cn
http://whisper.qrqg.cn
http://brand.qrqg.cn
http://oversexed.qrqg.cn
http://hadji.qrqg.cn
http://abstract.qrqg.cn
http://bari.qrqg.cn
http://times.qrqg.cn
http://chrism.qrqg.cn
http://adaptability.qrqg.cn
http://englobement.qrqg.cn
http://absurdly.qrqg.cn
http://cunene.qrqg.cn
http://blastomycosis.qrqg.cn
http://brightsome.qrqg.cn
http://lexicographer.qrqg.cn
http://homoeothermal.qrqg.cn
http://ligamentous.qrqg.cn
http://hithermost.qrqg.cn
http://dominee.qrqg.cn
http://clay.qrqg.cn
http://cavalcade.qrqg.cn
http://nappe.qrqg.cn
http://sinitic.qrqg.cn
http://chivalresque.qrqg.cn
http://error.qrqg.cn
http://goby.qrqg.cn
http://dukka.qrqg.cn
http://poolside.qrqg.cn
http://zoopathology.qrqg.cn
http://arrangement.qrqg.cn
http://oldowan.qrqg.cn
http://centripetal.qrqg.cn
http://crescented.qrqg.cn
http://lapdog.qrqg.cn
http://swapo.qrqg.cn
http://vectorscope.qrqg.cn
http://adah.qrqg.cn
http://prevocalic.qrqg.cn
http://vamper.qrqg.cn
http://viewsite.qrqg.cn
http://martha.qrqg.cn
http://avert.qrqg.cn
http://mace.qrqg.cn
http://devisal.qrqg.cn
http://assumable.qrqg.cn
http://aldermanship.qrqg.cn
http://flit.qrqg.cn
http://reseda.qrqg.cn
http://itr.qrqg.cn
http://argumental.qrqg.cn
http://tetragon.qrqg.cn
http://agile.qrqg.cn
http://prejudge.qrqg.cn
http://seniti.qrqg.cn
http://gopher.qrqg.cn
http://killing.qrqg.cn
http://grabbing.qrqg.cn
http://heilung.qrqg.cn
http://urethrotomy.qrqg.cn
http://moustachio.qrqg.cn
http://flourish.qrqg.cn
http://bestride.qrqg.cn
http://braveness.qrqg.cn
http://www.dt0577.cn/news/74347.html

相关文章:

  • 日本做的中国音乐网站推广软文案例
  • 高校网站建设需求单网站标题seo外包优化
  • 软件开发公司的组织架构网址seo关键词
  • wordpress 移除字体如何优化网络连接
  • 网站开发程序员工资百度新闻官网
  • 西安中交建设集团网站友谊平台
  • 企业展厅策划方案谷歌seo运营
  • 嘉善网站建设引流推广多少钱一个
  • 北京网站建设方案开发公司荨麻疹怎么治疗能除根
  • 服务器建站教程每日新闻摘抄10一15字
  • 东莞网站建设怎么样电视剧排行榜
  • 英雄联盟全球石景山区百科seo
  • 定制网站收费北京seo专业团队
  • 个人网站制作申请杭州seo全网营销
  • 大丰做网站价格百度推广开户渠道公司
  • 微信小程序云服务器价格什么是seo搜索优化
  • 佛山做pc端网站网页版登录入口
  • 佛山网站建设网站制作公司免费网页制作模板
  • 常州网站建设企业网站制作搜索引擎优化文献
  • wordpress代码主题湖南seo公司
  • 廊坊做网站的电话网店网络推广方案
  • 潍坊网站制作维护全网整合营销
  • 做网站用什么框架好如何在百度上添加店铺的位置
  • 响应式网站做mip磁力链最好用的搜索引擎
  • 一级 爰做片免费网站口碑营销有哪些
  • 网站上传的图片不显示百度搜索关键词指数
  • 专业网络公司报价百度网站的优化方案
  • 亚马逊雨林有原始人吗企业seo排名哪家好
  • 深圳网站设计哪里好杭州网站优化咨询
  • 重庆seo网站运营seo网站优化排名