zoukankan      html  css  js  c++  java
  • React练习 6 :记住密码提示框

    需求:鼠标mouseoverj时显示提示框,mouseoutj地隐藏

    import React,{useState,useEffect} from 'react';
    import ReactDOM from 'react-dom';
    import './index.css';
    
    
    function Tips(props){
        const [isShow,setShow]=useState(false);
        return(
            <div id="outer">
                <label            
                onMouseOver={()=>setShow(true)}
                onMouseOut={()=>setShow(false)}
                ><input type="checkbox" />两周内自动登陆</label>
                <div id="tips" className={isShow ? 'new' : ''}>为了您的信息安全,请不要在网吧或公用电脑上使用此功能!</div>
            </div>
        )
    }
    
    
    
    ReactDOM.render(
        <Tips/>,
        document.getElementById('root')
    )
  • 相关阅读:
    冷水花
    石竹
    红花酢浆草
    紫鸭跖草
    吊竹梅
    花叶络石
    牡丹
    CF1190D Tokitsukaze and Strange Rectangle
    CF1178D Prime Graph
    CF958E2 Guard Duty (medium)
  • 原文地址:https://www.cnblogs.com/sx00xs/p/11828031.html
Copyright © 2011-2022 走看看