天天看點

css折疊效果

<!DOCTYPE html> 

<html lang="en" dir="ltr"> 

<head> 

    <meta charset="utf-8"> 

    <title> 

         css折疊效果

    </title> 

    <style> 

        h1 { 

            color: #19b0cb; 

        } 

        .Fold { 

            position: absolute; 

            left: 50%; 

            top: 55%; 

            transform: translate(-50%, -50%); 

            width: 400px; 

            height: 200px; 

            background-color: #19b0cb; 

        } 

        h3 { 

            margin: 20px; 

            padding: 20px; 

            color: #fff;

        } 

        .Fold:after { 

            position: absolute; 

            content: \'\'; 

            right: 0; 

            top: 0; 

        } 

        .Fold:hover:after { 

            transition-duration: 1s; 

            border-bottom: 50px solid black; 

            border-right: 50px solid white; 

        } 

</style> 

</head> 

<body> 

    <center> 

        <h1> 

            web前端開發公衆号

        </h1> 

        <b> 

           web前端開發公衆号,網站:<a href="http://www.webqdkf.com">www.webqdkf.com</a>

        </b> 

        <div class="Fold"> 

            <h3> 

           web前端開發公衆号,網站:www.webqdkf.com</h3> 

        </div> 

    </center> 

</body> 

</html>