.box {
width: 300px;
height: 200px;
border: 1px solid darkcyan;
}
.title {
width: 100%;
height: 30px;
background-color: #ccc;
}
.title a {
float: left;
width: 25%;
line-height: 30px;
text-align: center;
text-decoration: none;
}
.con {
width: 100%;
height: 170px;
}
.con-list {
width: 100%;
height: 100%;
display: none;
}
.container {
width: 484px;
height: 301px;
position: relative;
}
.container-con {
width: 462px;
height: 282px;
margin: 10px;
box-shadow: 0 2px 8px 0 rgba(0, 0, 0, .09);
}
.con-list3 {
width: 100%;
height: 57px;
background: #f1f1f1;
}
.con-list1 {
float: left;
color: #000;
height: 57px;
width: 50%;
font-size: 18px;
cursor: pointer;
line-height: 57px;
text-align: center;
}
.con-foot-a {
height: 225px;
width: 462px;
display: none;
}
.con-foot-b {
height: 225px;
width: 462px;
display: block;
}
.con-foot-c {
position: absolute;
top: 143px;
height: 87px;
width: 291px;
background-repeat: no-repeat;
background-position: 0 center;
background-color: rgba(0, 0, 0, 0);
background-image: url(https://img.alicdn.com/tfs/TB1AnTXewMPMeJjy1XcXXXpppXa-290-87.png);
z-index: 99;
}
.con-foot-c-1 {
margin-left: 26px;
margin-top: 15px;
vertical-align: middle !important;
}
.con-con1 {
width: 23px;
height: 23px;
}
.con-span {
margin-left: 8px;
font-size: 24px;
font-weight: 700;
letter-spacing: 1px;
color: #00B262;
}
.con-span2 {
margin-left: 26px;
font-size: 20px;
letter-spacing: 1px;
color: black;
}
.item {
float: right;
margin-top: 10px;
margin-right: 30px;
width: 200px;
height: 200px;
}
</style>
选项一
选项二
选项三
选项四
111111
122211
113311
114411
links[i].onclick = function () {
for (let j = 0; j < lists.length; j++) {
console.log(j);
lists[j].style.display = "none";
links[j].style.background = "#ccc";
}
lists[i].style.display = "block";
console.log(i);
links[i].style.background = "red";
}
}
var tmall1 = document.querySelectorAll(".con-list1");
var tmall2 = document.querySelectorAll(".con-foot-a");
console.log(tmall1);
console.log(tmall2);
for (let i = 0; i < tmall1.length; i++) {
tmall1[i].onclick = function () {
for (let j = 0; j < tmall2.length; j++) {
tmall2[j].style.display = "none";
tmall1[j].style.background = "#f1f1f1"
tmall1[j].style.color = "black";
}
tmall2[i].style.display = "block";
tmall1[i].style.background = "#00B262";
tmall1[i].style.color = "#fff";
}
}
var flag = true;
setInterval(function () {
if (flag) {
tmall2[0].style.display = "block";
tmall1[0].style.background = "#00B262";
tmall1[0].style.color = "#fff";
tmall2[1].style.display = "none";
tmall1[1].style.background = "#f1f1f1"
tmall1[1].style.color = "black";
flag = false;
} else {
tmall2[1].style.display = "block";
tmall1[1].style.background = "#00B262";
tmall1[1].style.color = "#fff";
tmall2[0].style.display = "none";
tmall1[0].style.background = "#f1f1f1"
tmall1[0].style.color = "black";
flag = true;
}
}, 1500);
</script>

