1 Star 0 Fork 0

落枫/honework1

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
text.html 1.27 KB
一键复制 编辑 原始数据 按行查看 历史
hgm 提交于 2022-09-12 20:29 . add img/ to master
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<!-- 必须先引入vue,再引入elementui -->
<script src="https://cdn.jsdelivr.net/npm/vue@2.7.9"></script>
<!-- 引入elementui组件库-->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<style>
.el-carousel__item h3 {
color: #475669;
font-size: 18px;
opacity: 0.75;
line-height: 300px;
margin: 0;
}
.el-carousel__item:nth-child(2n) {
background-color: #99a9bf;
}
.el-carousel__item:nth-child(2n+1) {
background-color: #d3dce6;
}
</style>
</head>
<body>
<div id="outerBox" style="width:800px;margin: 0 auto;">
<el-carousel :interval="1500" type="card" height="200px">
<el-carousel-item v-for="item in goods" :key="item">
<img height="100%" width="100%" :src="item.src" alt="">
</el-carousel-item>
</el-carousel>
<!-- <el-carousel :interval="5000" arrow="always">
<el-carousel-item v-for="item in goods" :key="item">
<img height="100%" width="100%" :src="item.src" alt="">
</el-carousel-item>
</el-carousel> -->
</div>
</body>
<script>
new Vue({
el: '#outerBox',
data:{
goods:[
{src:'./img/2.jpg'},
{src:'./img/3.jpg'},
{src:'./img/4.jpg'}
]
}
})
</script>
</html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/hegaoming/honework1.git
git@gitee.com:hegaoming/honework1.git
hegaoming
honework1
honework1
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385