el-card左图片右文字
时间: 2024-01-18 21:03:02 浏览: 126
以下是一个el-card左图片右文字的例子:
```html
<template>
<el-card class="card" shadow="hover">
<div slot="header" class="clearfix">
<span>Card Name</span>
</div>
<div class="card-content">
<img src="https://picsum.photos/200/300" alt="card image" class="card-image">
<div class="card-text">
<h3 class="card-title">Card Title</h3>
<p class="card-description">Card Description</p>
<a href="#" class="card-link">Card Link</a>
</div>
</div>
</el-card>
</template>
<style>
.card {
min-width: 380px;
margin-right: 20px;
transition: all .5s;
}
.card:hover {
margin-top: -5px;
}
.card-content {
display: flex;
flex-direction: row;
align-items: center;
}
.card-image {
width: 200px;
height: 300px;
object-fit: cover;
margin-right: 20px;
}
.card-text {
display: flex;
flex-direction: column;
}
.card-title {
font-size: 24px;
margin: 0;
}
.card-description {
font-size: 16px;
margin: 10px 0;
}
.card-link {
font-size: 16px;
color: #409EFF;
}
</style>
```
阅读全文