js面向对象实现标签添加删除切换更名效果
代码语言:html
所属分类:选项卡
代码描述:js面向对象实现标签添加删除切换更名效果,通过es6中的class来实现
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>面向对象 Tab</title>
<style>
* {
margin: 0;
padding: 0
}
ul li {
list-style: none
}
main {
width: 960px;
height: 500px;
border-radius: 10px;
margin: 50px auto
}
main h4 {
height: 100px;
line-height: 100px;
text-align: center
}
.tabsbox {
width: 900px;
margin: 0 auto;
height: 400px;
border: 1px solid #ffa07a;
position: relative
}
nav ul {
overflow: hidden
}
nav ul li {
float: left;
width: 100px;
height: 50px;
line-height: 50px;
text-align: center;
border-right: 1px solid #ccc;
position: relative
}
nav ul li.liactive {
border-bottom: 2px solid #fff;
z-index: 9
}
#tab input {
width: 80%;
height: 60%
}
nav ul li span:last-child {
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0