React条件筛选

初学demo 请大家多多指教!

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

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="https://unpkg.com/react@16/umd/react.development.js"></script>
    <script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
    <script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script>
    <script src="https://cdn.bootcss.com/prop-types/15.6.1/prop-types.js"></script>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/kognise/water.css@latest/dist/light.css">
    <style>
        html,
        body {
   
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
            position: relative;
        }

        * {
   
            padding: 0;
            margin: 0;
        }


        ul {
   
            width: 100%;
        }

        ul li {
   
            width: 20%;
            height: 10%;
            font-size: 1rem;
            display: inline-block;
            text-align: center;
            box-sizing: border-box;
            padding: 2.5%;
            border: 1px solid black;
        }

        .content {
   
            z-index: 0;
            height: 92%;
            width: 100%;
            overflow-y: scroll;
            position: absolute;
            top: 8%;
            background: white;
        }

        .content div {
   
            height: 4rem;
            font-size: 1rem;
            line-height: 4rem;
            margin-bottom: .17rem;
            background: gray;
            border: 1px solid black;
        }

        .checked {
   
            background: gray;
        }

        .selected {
   
            background: gray;
        }

        .list {
   
            z-index: 1;
            width: 100%;
            background: white;
            position: absolute;
        }

        .list div {
   
            height: 2.5rem;
            font-size: 1rem;
            line-height: 2.5rem;
            padding-left: 5%;
            border: 1px solid black;
        }
    </style>
</head>

<body>
    <div id="app">
    </div>
</body>
<script type="text/babel">

    class Position extends React.Component {
   
        constructor() {
   
            super();
            this.state = {
   
                filterList: [
                    {
   
                        title: "经验", key: "c101270", name: "expirence",
                        item: [{
    key: "c101270100", name: "不限" },
                        {
    key: "c101270101", name: "在校生" },
                        {
    key: "c101270102", name: "应届生" 
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值