css當(dāng)點(diǎn)擊容器內(nèi)的元素時(shí),如何綁定到容器的點(diǎn)擊事件_html/css_WEB-ITnose
來(lái)源:懂視網(wǎng)
責(zé)編:小采
時(shí)間:2020-11-27 15:55:33
css當(dāng)點(diǎn)擊容器內(nèi)的元素時(shí),如何綁定到容器的點(diǎn)擊事件_html/css_WEB-ITnose
css當(dāng)點(diǎn)擊容器內(nèi)的元素時(shí),如何綁定到容器的點(diǎn)擊事件_html/css_WEB-ITnose: 本 ben .btn-today:active{ background: rgb(255,255,255);} 當(dāng)我點(diǎn)擊內(nèi)的'本'時(shí)無(wú)法激活樣式btn-today:active,點(diǎn)擊之外是可以激活的。 有什么寫(xiě)法可以解決這個(gè)問(wèn)題?謝謝。 回復(fù)討論(解決方案) 應(yīng)該是 .rb:active{
導(dǎo)讀css當(dāng)點(diǎn)擊容器內(nèi)的元素時(shí),如何綁定到容器的點(diǎn)擊事件_html/css_WEB-ITnose: 本 ben .btn-today:active{ background: rgb(255,255,255);} 當(dāng)我點(diǎn)擊內(nèi)的'本'時(shí)無(wú)法激活樣式btn-today:active,點(diǎn)擊之外是可以激活的。 有什么寫(xiě)法可以解決這個(gè)問(wèn)題?謝謝。 回復(fù)討論(解決方案) 應(yīng)該是 .rb:active{

.btn-today:active{ background: rgb(255,255,255);}
當(dāng)我點(diǎn)擊內(nèi)的'本'時(shí)無(wú)法激活樣式btn-today:active,點(diǎn)擊之外是可以激活的。
有什么寫(xiě)法可以解決這個(gè)問(wèn)題?謝謝。。
回復(fù)討論(解決方案)
應(yīng)該是 .rb:active{
background: rgb(255,255,255);
}吧
.btn-tody>span{
pointer-events: none;
}
.btn-tody>span{
pointer-events: none;
}
pointer-events是可以忽略上層的事件還是忽略并激活下層的事件呢,我試了一下沒(méi)有變化。
我要容器的背景變色,同樣的頁(yè)面,IE有這個(gè)問(wèn)題,F(xiàn)F,Chrome沒(méi)有問(wèn)題
聲明:本網(wǎng)頁(yè)內(nèi)容旨在傳播知識(shí),若有侵權(quán)等問(wèn)題請(qǐng)及時(shí)與本網(wǎng)聯(lián)系,我們將在第一時(shí)間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com
css當(dāng)點(diǎn)擊容器內(nèi)的元素時(shí),如何綁定到容器的點(diǎn)擊事件_html/css_WEB-ITnose
css當(dāng)點(diǎn)擊容器內(nèi)的元素時(shí),如何綁定到容器的點(diǎn)擊事件_html/css_WEB-ITnose: 本 ben .btn-today:active{ background: rgb(255,255,255);} 當(dāng)我點(diǎn)擊內(nèi)的'本'時(shí)無(wú)法激活樣式btn-today:active,點(diǎn)擊之外是可以激活的。 有什么寫(xiě)法可以解決這個(gè)問(wèn)題?謝謝。 回復(fù)討論(解決方案) 應(yīng)該是 .rb:active{