image.png

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

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    :root {
        --my-color: linear-gradient(to top, rgb(236, 223, 78), rgb(255, 255, 66));
    }
    .hc1 {
        position: relative;
    }
    .a2 {
        position: fixed;
        z-index: 9;
    }
    .a1 {
        width: 100px;
        height: 10px;
        border-radius: 10px;
        background-image: var(--my-color);
        position: fixed;
        top: 3px;
        z-index: 1;
    }
</style>
 

<body>
   
    <div class="hc1">
        <span class="a2">这是带有横向阴影的文字22。</span>
        <p class="a1"></p>
    </div>
</body>

</html>