web前端入門到實(shí)戰(zhàn):css鼠標(biāo)經(jīng)過彈出子菜單特效

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name=viewport content='width=device-width, initial-scale=1, maximum-scale=1'>
<title>Hello React!</title>
<style>
::-webkit-scrollbar{ display:none; }
::-webkit-input-placeholder { 
  font-size: 20px;
}web前端開發(fā)學(xué)習(xí)Q-q-u-n: 731771211,分享學(xué)習(xí)的方法和需要注意的小細(xì)節(jié),不停更新最新的教程和學(xué)習(xí)方法(詳細(xì)的前端項(xiàng)目實(shí)戰(zhàn)教學(xué)視頻,PDF)
li , span , img{
    list-style-type:none;
    cursor:pointer;
} 
html,body,#app{
    margin: 0;
    padding: 0;
    height: 100%;
    -webkit-overflow-scrolling: touch;
}

#circle:before{
    content:'';
    display:block;
    border-radius: 50%;
    transition: .5s ;
}    
#circle:hover:before{
    width: 50px;
    height: 50px;
    border:1px solid;
    transform:translate(-100px,70px);
    box-shadow: 0 0 0 10px gray;
}
#circle:after{
    content:'';
    display:block;
    border-radius: 50%;
    transition: .5s ;
}    
#circle:hover:after{
    width: 50px;
    height: 50px;
    border:1px solid;
    transform:translate(100px,16px);
}
#circle ~ div{
    transform:translateY(50px);
}
#circle:hover ~ div{
    width: 50px;
    height: 50px;
    border:1px solid;
    border-radius: 50%;
    transform:translateY(70px);
    transition: transform .5s ;
}
#circle ~div:before{
    content:'';
    display:block;
    border-radius: 50%;
    transition: .5s .5s ;
}
#circle:hover ~ div:before{
    width: 50px;
    height: 50px;
    border:1px solid;
    transform:translateY(70px);
}    
</style>
<link href='index.css' rel='stylesheet' type='text/css' />
<script src="https://cdn.staticfile.org/react/16.4.0/umd/react.development.js"></script>
<script src="https://cdn.staticfile.org/react-dom/16.4.0/umd/react-dom.development.js"></script>
<script src="https://cdn.staticfile.org/babel-standalone/6.26.0/babel.min.js"></script>
<script src="index.js"></script>
</head>
<body>
<div id='app'></div>
<script type="text/babel">
const l=console.log
var Flex=(flex,props)=>
<div className={flex} style={props.style} onClick={props.click} id={props.id}>
    {props.data ? props.data.map(d=><span>u0z1t8os</span>) : props.children}
</div>
class Index extends React.Component{
    state={
    }
    render() {
        return (
            <CC>
                <div id='circle' style={{position:'absolute', width: '50px', height: '50px', border:'1px solid', borderRadius: '50%' }}>
                </div>
                <div ></div>
            </CC>    
        )
    }    
}
ReactDOM.render(
    <Index />,
    document.getElementById('app')
)
</script>
</body>
</html>
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容