第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

css如圖,鼠標(biāo)指上之后,下面透明遮罩上拉一小塊,顯示詳細(xì)信息是如何實(shí)現(xiàn)的?

css如圖,鼠標(biāo)指上之后,下面透明遮罩上拉一小塊,顯示詳細(xì)信息是如何實(shí)現(xiàn)的?

慕桂英3389331 2019-03-01 18:54:06
查看完整描述

2 回答

?
楊魅力

TA貢獻(xiàn)1811條經(jīng)驗(yàn) 獲得超6個(gè)贊

大致原理是一樣的

<!DOCTYPE html>

<html>

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <meta http-equiv="X-UA-Compatible" content="ie=edge">

    <title>Document</title>

    <style>

        .imgbox,.imgbox2{

            width:200px;

            height: 140px;

            position:relative;

            overflow: hidden;

        }

        img{

            width:100%;

        }

        .imgbox:after{

            position:absolute;

            left: 0;

            top:0;

            display: block;

            width:100%;

            height: 100%;

            background-color: rgba(0, 0, 0, 0.5);

            content: attr(data-text);

            transition:all 0.4s ease;

            transform: translateY(-100%);

            color: #FFF;

        }

        .imgbox2:after,.imgbox2:before{

            position:absolute;

            left: 0;   

            display: block;

            height: 50%;

            background-color: rgba(0, 0, 0, 0.5);

            transition:all 0.4s ease;

            color: #FFF;

            content: '';

            width: 100%;

        }

        .imgbox2:before{

            top: 0;

            transform: translateY(-100%);

        }

        .imgbox2:after{

            bottom:0;

            transform: translateY(100%);

        }

        .imgbox:hover:after{

            transform: translateY(0);

        }

        .imgbox2:hover:after{

            transform: translateY(0);

        }

        .imgbox2:hover:before{

            transform: translateY(0);

        }

    </style>

</head>

<body>

    <div class="imgbox" data-text="我是文字">

            <img src="./2.jpg" alt="">

    </div>

    <div class="imgbox2" data-text="我是文字">

            <img src="./2.jpg" alt="">

    </div>

</body>

</html>


查看完整回答
反對(duì) 回復(fù) 2019-03-04
  • 2 回答
  • 0 關(guān)注
  • 752 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)