 <style>
        /* 容器：用于包裹图片和文字，实现相对定位 */
        .img-container {
            /* 相对定位：作为文字绝对定位的参考 */
            position: relative;
            /* 可选：限制容器宽度，和图片宽度一致 */
            width: 500px;
            /* 可选：防止文字溢出容器 */
            overflow: hidden;
        }

        /* 图片样式：确保图片自适应容器 */
        .img-container img {
            width: 100%;
            /* 去掉图片默认间隙 */
            display: block;
        }

        /* 文字样式：核心是绝对定位 */
        .img-text {
            position: absolute;
            top: 180px;
            left: 100px;
            font-size: 50px;
            color: white;
            /* 可选：文字内边距，让背景更美观 */
            padding: 8px 15px;
            /* 可选：文字粗细 */
            font-weight: bold;
            /* 可选：文字对齐（如果文字换行） */
            text-align: center;
            font-family: microsoft yahei;
        }

        /* 示例：另一个位置的文字（右下角） */
        .img-text-bottom {
            position: absolute;
            bottom: 20px;  /* 距离图片底部 20px */
            right: 20px;   /* 距离图片右侧 20px */
            font-size: 18px;
            color: yellow;
            font-family: "微软雅黑"; /* 字体 */
        }
    </style>