element-ui_el-card-卡片

element-ui_el-card-卡片

目录




内容

1、简介

一种卡片容器。

  • 应用场景:用于立体,有层次感的容器
  • 效果图1-1:[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-Mmpagvhe-1597763786275)(./images/2020-08-18_el-card.png)]

2、使用

2.1、常用属性

  • el-card
属性名类型可接受值默认描述
headerstring--字符串标题或者slot#header插槽自定义
body-styleobject-{padding: ‘20px’}card主体的css样式
shadowstringalways/hover/neveralways什么时候显示卡片阴影 always-一直,hover-鼠标悬停显示,never-不显示

2.2、效果图源码

<el-row>
  <el-col :span="8" v-for="(o, index) in 2" :key="o" :offset="index > 0 ? 2 : 0">
	<el-card :body-style="{ padding: '0px' }">
	  <img src="https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png" class="image">
	  <div style="padding: 14px;">
		<span>Yummy hamburger</span>
		<div class="bottom clearfix">
		  <time class="time">{{ currentDate }}</time>
		  <el-button type="text" class="button">Operating</el-button>
		</div>
	  </div>
	</el-card>
  </el-col>
</el-row>

<style>
  .time {
	font-size: 13px;
	color: #999;
  }

  .bottom {
	margin-top: 13px;
	line-height: 12px;
  }

  .button {
	padding: 0;
	float: right;
  }

  .image {
	width: 100%;
	display: block;
  }

  .clearfix:before,
  .clearfix:after {
	  display: table;
	  content: "";
  }

  .clearfix:after {
	  clear: both
  }
</style>

<script>
export default {
  data() {
	return {
	  currentDate: new Date()
	};
  }
}
</script>

后记

本项目为参考某马视频开发,相关视频及配套资料可自行度娘或者联系本人。上面为自己编写的开发文档,持续更新。欢迎交流,本人QQ:806797785

前端项目源代码地址:https://gitee.com/gaogzhen/ly-bms    // 前端后台管理系统
后端JAVA源代码地址:https://gitee.com/gaogzhen/ly-backend        // 后端项目
  • 0
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

gaog2zh

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值