CSS3 列表 checkbox勾选特效

代码语言:html

所属分类:表单美化

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

<!DOCTYPE html>
<html lang="en" >

<head>
<meta charset="UTF-8">
<title>CSS3当日工作事项列表勾选特效</title>
<style>
    @import url(https://fonts.googleapis.com/css?family=Open+Sans:400,600);
.frame {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 400px;
  height: 400px;
  margin-top: -200px;
  margin-left: -200px;
  border-radius: 2px;
  box-shadow: 4px 8px 16px 0 rgba(0, 0, 0, 0.1);
  overflow: hidden;
  color: #333;
  font-family: 'Open Sans', Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /*
  http://colorzilla.com/gradient-editor */
  background: #fda231;
  background: linear-gradient(45deg, #fda231 0%, #fbb731 60%, #fdca31 100%);
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fda231', endColorstr='#fdca31',GradientType=1 );
}

.center {
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
}

.todo-cmp {
  background: #ffffff;
  color: #497081;
  padding: 10px 30px;
  border-radius: 5px;
  box-shadow: 2px 2px 14px rgba(0, 0, 0, 0.15);
  width: 180px;
}
.todo-cmp__header {
  text-align: center;
  padding: 10px 0;
  border-bottom: 1px solid #ddd;
}
.todo-cmp__header h2 {
  font-weight: 600;
  font-size: 1.2rem;
  margin: 4px auto;
  padding: 0;
}
.todo-cmp__header p {
  padding: 0 0 5px;
  margin: 4px auto;
  font-size: 0.8rem;
}
.todo-cmp__list {
  list-style: none;
  padding: 0;
}
.todo-cmp__list li {
  padding: 10px 0 15px;
  margin: 0;
  text-align: left;
  width: 100%;
}
.todo-cmp__list li label {
  cursor: pointer;
  font-size: 0.82rem;
  width: 100%;
  display: block;
}
.todo-cmp__list li label input {
  float: right;
  opacity: 0;
}
.todo-cmp__list li label span {
  position: relative;
  display: block;
  transition: all 550ms ease-in-out;
}
.todo-cmp__list li label input + span::after {
  content: "";
  display: block;
  border: 1px solid #497081;
  border-radius: 13px;
  height: 13px;
  width: 13px;
  position: .........完整代码请登录后点击上方下载按钮下载查看

网友评论0