日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

:focus-within的冒泡触发

發(fā)布時間:2023/12/19 编程问答 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 :focus-within的冒泡触发 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

看個具體的例子:

<html> <style> html, body, .g-father, .g-children {padding: 30px;border:1px solid green; }input {display: block;border: none;outline: none;border: 1px solid black;margin: 0 auto; }input:focus {background: yellow;}html:focus-within {background: red; }body:focus-within {background: purple }.g-father:focus-within {background: white; }.g-children:focus-within {background: pink; }.g-html, .g-body, .g-fath, .g-chil {position: fixed; }.g-html {left: 30px;top: 10px; } .g-body {left: 60px;top: 40px; }.g-fath {top: 70px;left: 90px; }.g-chil {top: 100px;left: 120px; } </style> <div class="g-father"><div class="g-children"><input type="button" value="Button"></div> </div><div class="g-html">HTML</div> <div class="g-body">BODY</div> <div class="g-fath">Father</div> <div class="g-chil">Children</div> </html>

初始頁面:

button獲得focus后:

button變成黃色:

children變成粉色,father變成白色,body變成紫色,html變成紅色

更多Jerry的原創(chuàng)文章,盡在:“汪子熙”:

創(chuàng)作挑戰(zhàn)賽新人創(chuàng)作獎勵來咯,堅持創(chuàng)作打卡瓜分現(xiàn)金大獎

總結(jié)

以上是生活随笔為你收集整理的:focus-within的冒泡触发的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。