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

珠海建设信息网站seo技术自学

珠海建设信息网站,seo技术自学,女装wordpress,wordpress 调用摘要记录下el-card 组合 el-descriptions 实现动态展示信息 文章结构 实现效果1. el-descriptions 组件使用1.1 结合v-for实现列表渲染1.2 解析 2. 自定义 el-descriptions 样式2.1 修改背景色、字体颜色2.2 调整字体大小2.3 解析 3. el-card 结合 el-descriptions 作为信息展示3.…

记录下el-card 组合 el-descriptions 实现动态展示信息

文章结构

      • 实现效果
      • 1. `el-descriptions` 组件使用
        • 1.1 结合v-for实现列表渲染
        • 1.2 解析
      • 2. 自定义 `el-descriptions` 样式
        • 2.1 修改背景色、字体颜色
        • 2.2 调整字体大小
        • 2.3 解析
      • 3. `el-card` 结合 `el-descriptions` 作为信息展示
        • 3.1 代码
        • 3.2 解析
      • 4. `el-card` 标题分割线优化
        • 4.1 涉及style
        • 4.2 解析

实现效果

在这里插入图片描述

1. el-descriptions 组件使用

1.1 结合v-for实现列表渲染
<el-descriptions :column="1"><el-descriptions-item v-for="(label, index) in item.labels" :key="index" :label="label">{{ item.params[index] }}</el-descriptions-item>
</el-descriptions>
1.2 解析
  • :column="1" 👉 设置 el-descriptions 每行只显示 1 列(默认是 3 列)。
  • el-descriptions-item 通过 v-for 遍历 labelsparams,动态生成描述项。
  • :label="label" 👉 绑定每个 el-descriptions-item 的标题。

2. 自定义 el-descriptions 样式

2.1 修改背景色、字体颜色
/* 控制 el-descriptions 的背景透明 */
:deep(.el-descriptions),
:deep(.el-descriptions__body) {background: transparent !important;
}/* 控制 el-descriptions-item 的颜色 */
:deep(.el-descriptions-item) {background: transparent !important;color: white !important;
}/* 控制 el-descriptions 的 label 和 content 颜色 */
:deep(.el-descriptions__label),
:deep(.el-descriptions__content) {color: white !important; /* 让 el-descriptions 的文字变白 */
}
2.2 调整字体大小
/* 标签部分(左侧的 label) */
:deep(.el-descriptions__label) {font-size: 16px !important;
}/* 内容部分(右侧的内容) */
:deep(.el-descriptions__content) {font-weight: bold;font-size: 17px !important;
}
2.3 解析
  • background: transparent 👉 让 el-descriptionsel-descriptions-item 背景变透明。
  • color: white 👉 让 labelcontent 变成白色字体。
  • font-sizefont-weight: bold 👉 调整 labelcontent 的字号和加粗状态。

3. el-card 结合 el-descriptions 作为信息展示

3.1 代码
<el-card v-for="item in systemParam" :key="item.title" shadow="always":style="{background: `linear-gradient(135deg, ${item.colorStart}, ${item.colorEnd})`,color: 'white'}"
><template #header><span style="color: white;  font-size: 18px ; font-weight: bold;">{{ item.title }}</span></template><el-descriptions :column="1"><el-descriptions-item v-for="(label, index) in item.labels" :key="index" :label="label">{{ item.params[index] }}</el-descriptions-item></el-descriptions>
</el-card>
3.2 解析
  • 每个 el-card 代表一个数据块。
  • 通过 linear-gradient 动态设置 el-card 背景颜色。
  • el-descriptions 作为 el-card 内容展示详细参数信息。

4. el-card 标题分割线优化

4.1 涉及style
/*  el-card 自带的标题分割线和标题绑定过深,不方便调整 */
/* 移除 el-card 自带的标题分割线 */
:deep(.el-card__header) {position: relative;border-bottom: none;
}/* 自定义标题分割线 */
:deep(.el-card__header::after) {content: ''; position: absolute;bottom: 0;left: 50%;width: 90%;height: 1px;background-color: rgba(255, 255, 255, 0.5);transform: translateX(-50%);
}
4.2 解析
  • border-bottom: none 👉 取消 el-card 默认的底部边框。
  • el-card__header::after 👉 通过 伪元素 自定义一条更短的分割线。
http://www.hkea.cn/news/41683/

相关文章:

  • 怎么查公司网站有没有被收录火爆产品的推广文案
  • 绵阳网站建设 经开区网络教学平台
  • wordpress阅读量没改7个湖北seo网站推广策略
  • 网站建设成功案例方案找培训机构的平台
  • 园林绿化网站建设百度关键词优化公司
  • 个人如何建设网站网络营销方式有哪些分类
  • 北京做百度网站建设电商平台如何推广运营
  • 电脑个人网站怎么做网络销售新手入门
  • 海口网站建设 小黄网络手机百度搜索
  • 太原百度网站建设网站应该如何进行优化
  • 烟台市做网站uc浏览网页版进入
  • 工程信息网站哪家做的较好提高工作效率心得体会
  • 建站平台入口徐州网站设计
  • 出口手工艺品网站建设方案站长统计app下载
  • 提升学历骗局武汉搜索引擎排名优化
  • wordpress+park主题上海全国关键词排名优化
  • 潍坊最早做网站的公司短链接生成网址
  • 东莞化工网站建设爱站网ip反域名查询
  • 做网站赚钱 2017哈尔滨关键词排名工具
  • 建设的网站首页微信怎么做推广
  • 建设网站导航百度信息流推广和搜索推广
  • 深圳室内设计公司招聘信息流广告优化
  • 旅游网站首页四种营销模式
  • 负责网站建设如何在百度发广告推广
  • 联通的网站是谁做的营销的主要目的有哪些
  • 衡阳微信网站地推的方法和技巧
  • 南阳做网站公司哪家好自动发外链工具
  • 潍坊网站制作最低价格网络营销案例有哪些
  • 做网站有谁做谷歌seo视频教程
  • 资深的网站推广完美日记网络营销策划书