1 Star 0 Fork 0

jinlllll/day02

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
elm.html 4.28 KB
一键复制 编辑 原始数据 按行查看 历史
jinlllll 提交于 2022-10-11 21:57 . 作业
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
*{
margin: 0;
padding: 0;
}
#app{
width: 96%;
margin: auto ;
}
header{
background-color: blueviolet;
}
header h1{
color: white;
font-weight: 400;
margin: 0 0 5px 15px;
}
header input{
width: 95%;
margin: 8px;
border: none;
height: 35px;
background-color: aliceblue;
border-radius: 35px;
text-align: center;
}
#app .list1{
display: flex;
justify-content: space-between;
text-align: center;
margin: 15px 0;
}
#app .list1 span{
width: 25%;
}
#app .list2{
display: flex;
justify-content: space-between;
text-align: center;
}
#app .list2 span{
background-color: #f5f5f5;
margin-bottom: 10px;
text-align: center;
border-radius: 6px;
padding: 5px;
}
#app .card .card1{
height: 140px;
}
#app .card .card1 img{
height: 100px;
width: 100px;
float: left;
margin:5px;
}
#app .card .card1 .score{
font-size: 12px;
color: red;
display: inline-block;
margin-top: 10px;
}
#app .card .card1 .sell{
font-size: 12px;
}
#app .card .card1 .money{
font-size: 12px;
}
#app .card .card1 .time{
font-size: 12px;
float:right;
}
#app .card .card1 .appraise{
font-size: 12px;
background-color: rgb(187, 255, 170);
color: green;
margin: 5px 2px;
display: inline-block;
}
#app .card .card1 .reduce{
font-size: 12px;
border-radius: 5px;
border: 1px red solid;
margin: 0 2px;
color: red;
padding: 1px;
}
footer{
width: 100%;
text-align: center;
position: fixed;
bottom: 0;
display: flex;
justify-content: space-between;
border: 1px solid #f5f5f5;
height: 40px;
}
footer .foot{
width: 33%;
}
</style>
</head>
<body>
<header>
<h1>饿了么</h1>
<input type="text" placeholder="输入商家、商品名称">
</header>
<div id="app">
<div style="height: 100px;" ></div>
<h3>猜你喜欢</h3>
<div class="list1">
<span v-for="(item,index) in arr" :style="{fontWeight: nowIndex == index?700:400}" @click="handleClick(index)">{{item}}</span>
</div>
<div class="list2">
<span v-for="(item,index) in arr1">{{item}}</span>
</div>
<div class="card">
<div class="card1" v-for="(item,index) in information">
<img :src="item.pic" >
<h3>{{item.name}}</h3>
<span class="score">星 {{item.score}}</span>
<span class="sell">月售 {{item.sell}}</span><br>
<span class="money">起送¥20 远距离配送¥{{item.money}}</span>
<span class="time">{{item.minute}}分钟 {{item.km}}km </span><br>
<!-- <span class="appraise">"{{item.appraise}}"</span> -->
<span class="appraise" v-for="(item,index) in item.appraise">"{{item}}"</span><br>
<span class="reduce" v-for="(item,index) in item.reduce">{{item}}</span>
</div>
</div>
</div>
<footer >
<span class="foot" v-for="(item,index) in arr2" @click="handleClick(index)" :style="{color:currentIndex==index?'red':'' }">{{item}}</span>
</footer>
</body>
</html>
<script src="./vue-2.5.21.js"></script>
<script src="./elm.js"></script>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/jinlllll/day02.git
[email protected]:jinlllll/day02.git
jinlllll
day02
day02
master

搜索帮助