亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

將鼠標懸停在類上時更改 li 類的 CSS

將鼠標懸停在類上時更改 li 類的 CSS

MM們 2023-09-18 17:20:33
我想更改 li 類的 CSS,同時將鼠標懸停在類上。我的網站是hoomi.nl。具體頁面為: https: //hoomi.nl/producten/。當有人將鼠標懸停在產品圖像/產品框上方時,應該會彈出“meer informie”按鈕?,F在,僅當您將鼠標懸停在產品框的中心時,該按鈕才會出現。我怎么能這么做呢?我已經創建了自定義 css 來向上移動按鈕并更改顏色,以使其在您不將鼠標懸停在其上時不可見,而當您將鼠標懸停在其上時,背景和文本將獲得顏色,以便您可以看到它。li.product .button{    font-weight: 300;    font-size: 13px;    color: #fff0;    border-radius: 5px;    background: #fff0;    left: 50%;    line-height: 1em;    margin: 0;    margin-left: -6em;    margin-top: -2.5em;    position: absolute;    top: 50%;    transition: opacity .4s cubic-bezier(.5,.25,0,1);    width: 12em;}    li.product .button:hover {    background-color: #fff;    color: #333;}
查看完整描述

2 回答

?
夢里花落0921

TA貢獻1772條經驗 獲得超6個贊

您是否嘗試過使用:hoverCSS <li>,如下所示:


li.product:hover .button {

    background-color: #fff;

    color: #333;

}



查看完整回答
反對 回復 2023-09-18
?
慕仙森

TA貢獻1827條經驗 獲得超8個贊

請在您的 css 文件中添加以下 CSS:


.elementor-widget-woocommerce-products.elementor-wc-products ul.products li.product:hover .button {

    display: block;

}

.elementor-widget-woocommerce-products.elementor-wc-products ul.products li.product .button {

    display: none;

}


查看完整回答
反對 回復 2023-09-18
  • 2 回答
  • 0 關注
  • 148 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號