div+css实现tab选项卡点击切换效果代码

代码语言:html

所属分类:选项卡

代码描述:div+css实现tab选项卡点击切换效果代码

代码标签: div css tab 选项卡 点击 切换

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum=1.0,minimum=1.0,user-scalable=0" />

     <style>
     .radio-inputs {
  position: relative;
  display: flex;
  border-radius: 0.5rem;
  background-color: #70c489;
  box-sizing: border-box;
  font-size: 14px;
  width: 90%;
  padding: 1rem 1rem 0 1rem;
}

.radio-inputs .radio input {
  display: none;
}

.radio-inputs .radio .name {
  display: flex;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
  border: none;
  padding: 0.5rem 0.8rem;
  color: ;
  transition: all 0.15s ease-in-out;
  position: relative;
}

.radio-inputs .radio input:checked + .name {
  background-color: #e8e8e8;
  font-weight: 600;
}
.radio-inputs .radio input + .name:hover {
  color: #fff;
}
.radio-inputs .radio input:checked + .name:hover {
  color: #1d1d29;
}

.radio-inputs .radio input:checked + .name::after,
.radio-inputs .radio input:checked + .name.........完整代码请登录后点击上方下载按钮下载查看

网友评论0