-
Notifications
You must be signed in to change notification settings - Fork 0
/
20230514jd_tab.html
192 lines (182 loc) · 6 KB
/
20230514jd_tab.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<!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;
}
.feed-content {
background-image: url(//storage.360buyimg.com/channel2022/jd_home/0.0.16/assets/sprite/content_bg_mini/sprite.png);
background-position: -380px 0;
width: 190px;
height: 266px;
position: relative;
list-style-type: none;
cursor: pointer;
}
.feed-content > div {
display: block;
}
.feed-content__head {
text-align: center;
margin: 0px auto 27px;
width: 90px;
height: 28px;
line-height: 28px;
color: #ffff;
border-radius: 50px;
background-color: #f2272b;
font-weight: 700;
font-size: 16px;
}
.feed-content__list {
display: block;
margin-left: 6px;
}
.feed-content__list-item {
width: 74px;
height: 30px;
line-height: 30px;
margin-left: 9px;
float: left;
list-style: none;
border: 1px solid #ffe0e8;
border-radius: 5px;
text-align: center;
margin-bottom: 10px;
}
.feed-content__list-item > a {
font-size: 13px;
text-decoration: none;
color: #c81623;
}
/* .feed-content__list-item:hover {
background-color: #c81623;
}
.feed-content__list-item:hover a {
color: #ffe0e8;
} */
</style>
</head>
<body>
<li class="feed-content">
<div>
<p class="feed-content__head">精选热点</p>
<ul class="feed-content__list">
<li class="feed-content__list-item">
<a
class="feed-content__list-link"
title="电动牙刷"
aria-label="电动牙刷"
href="//search.jd.com/Search?keyword=%E7%94%B5%E5%8A%A8%E7%89%99%E5%88%B7&enc=utf-8"
target="_blank"
clstag="h|keycount|feed|01#search_005-01"
>电动牙刷</a
>
</li>
<li class="feed-content__list-item">
<a
class="feed-content__list-link"
title="汽车坐垫"
aria-label="汽车坐垫"
href="//search.jd.com/Search?keyword=%E6%B1%BD%E8%BD%A6%E5%9D%90%E5%9E%AB&enc=utf-8"
target="_blank"
clstag="h|keycount|feed|01#search_005-02"
>汽车坐垫</a
>
</li>
<li class="feed-content__list-item">
<a
class="feed-content__list-link"
title="美的电饭煲"
aria-label="美的电饭煲"
href="//search.jd.com/Search?keyword=%E7%BE%8E%E7%9A%84%E7%94%B5%E9%A5%AD%E7%85%B2&enc=utf-8"
target="_blank"
clstag="h|keycount|feed|01#search_005-03"
>美的电饭煲</a
>
</li>
<li class="feed-content__list-item">
<a
class="feed-content__list-link"
title="电压力锅"
aria-label="电压力锅"
href="//search.jd.com/Search?keyword=%E7%94%B5%E5%8E%8B%E5%8A%9B%E9%94%85&enc=utf-8"
target="_blank"
clstag="h|keycount|feed|01#search_005-04"
>电压力锅</a
>
</li>
<li class="feed-content__list-item">
<a
class="feed-content__list-link"
title="活性炭"
aria-label="活性炭"
href="//search.jd.com/Search?keyword=%E6%B4%BB%E6%80%A7%E7%82%AD&enc=utf-8"
target="_blank"
clstag="h|keycount|feed|01#search_005-05"
>活性炭</a
>
</li>
<li class="feed-content__list-item">
<a
class="feed-content__list-link"
title="加湿器"
aria-label="加湿器"
href="//search.jd.com/Search?keyword=%E5%8A%A0%E6%B9%BF%E5%99%A8&enc=utf-8"
target="_blank"
clstag="h|keycount|feed|01#search_005-06"
>加湿器</a
>
</li>
<li class="feed-content__list-item">
<a
class="feed-content__list-link"
title="餐桌"
aria-label="餐桌"
href="//search.jd.com/Search?keyword=%E9%A4%90%E6%A1%8C&enc=utf-8"
target="_blank"
clstag="h|keycount|feed|01#search_005-07"
>餐桌</a
>
</li>
<li class="feed-content__list-item">
<a
class="feed-content__list-link"
title="乒乓球拍"
aria-label="乒乓球拍"
href="//search.jd.com/Search?keyword=%E4%B9%92%E4%B9%93%E7%90%83%E6%8B%8D&enc=utf-8"
target="_blank"
clstag="h|keycount|feed|01#search_005-08"
>乒乓球拍</a
>
</li>
</ul>
</div>
</li>
</body>
<script>
let listItems = Array.from(
document.querySelectorAll(".feed-content__list-item")
);
listItems.forEach((listItem) => {
listItem.addEventListener("mouseover", function () {
listItem.style.backgroundColor = "red";
const aElement = listItem.querySelector("a");
aElement.style.color = "#ffe0e8";
});
listItems.forEach((listItem) => {
listItem.addEventListener("mouseout", function () {
listItem.style.backgroundColor = "";
const aElement = listItem.querySelector("a");
aElement.style.color = "";
});
});
});
</script>
</html>