您好,欢迎来到五一七教育网。
搜索
您的当前位置:首页CSS3文字穿透效果

CSS3文字穿透效果

来源:五一七教育网

代码如下:

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            height: 100vh;
            background: url("img/imga/城市.webp");
            background-size: 100% 100%;
            font-family: 'Open Sans', sans-serif;
        }
        
        .modal {
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
        }
        
        .modal h1 {
            text-align: center;
            display: flex;
            font-size: 12vw;
            justify-content: center;
            align-items: center;
            /* -webkit-text-stroke-width: 1px; */
            -webkit-text-stroke-color: #fff;
            /* text-stroke: 1px #fff;
            -webkit-text-stroke: 1px #fff; */
            background: url("img/imga/城市.webp") no-repeat center/cover;
            background-clip: text;
            -webkit-background-clip: text;
            color: transparent;
        }
    </style>
</head>
<div class="modal">
    <h1>AMSTERDAM</h1>
</div>

<body>

</body>

</html>

运行效果:

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- 517ttc.cn 版权所有 赣ICP备2024042791号-8

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务