gpt4 book ai didi

php - 在我的 blade.php 上显示特定图像作为水印背景?拉维

转载 作者:行者123 更新时间:2023-11-27 23:05:17 24 4
gpt4 key购买 nike

我想在我元素的特定页面上制作水印。

我把这个写在 app.css 中

.watermarked {
position: relative;
}

.watermarked:after {
content: "";
display: block;
width: 100%;
height: 100%;
position: absolute;
top: 0px;
left: 0px;
background-image: url("../images/SystemLogo.png");
background-size: 100px 100px;
background-position: 30px 30px;
background-repeat: repeat;
opacity: 0.7;
}

这是我的剑

@extends('layouts1.index')

@section('content')

<div class="container">
<head>
<meta charset="UTF-8">
</head>

<body>
<div class="watermarked">
<div class="text-center">

<h2 class="text-center"> Appri=oval report </h2>
<form method="post" action="/student/share-approval/{{$approval->uniid}}">
@csrf
<p lang="ar" dir="rtl">
// here is the approval report
</p>
<button type="submit" class="btn btn-primary">share the report </button>
</div>
</div>
</body>
</form>
</div>
@endsection

问题是没有将水印显示为我想要的图像。结果是默认背景。如何将图像显示为背景?

最佳答案

我认为您的 HTML 格式不正确。结束表单标签和 div 位于 body 标签下方。

试试这个:

.watermarked {
position: relative;
}

.watermarked:after {
content: "";
display: block;
width: 100%;
height: 100%;
position: absolute;
top: 0px;
left: 0px;
background-image: url("https://en.opensuse.org/images/4/49/Amarok-logo-small.png");
background-size: 100px 100px;
background-position: 30px 30px;
background-repeat: repeat;
opacity: 0.7;
}
<div class="watermarked">
<div class="text-center">
<h2 class="text-center">Stuff here</h2>
<form method="post" action="/#">
<p>
A Form here
</p>
<button type="submit" class="btn btn-primary">Button</button>
</form>
</div>
</div>

关于php - 在我的 blade.php 上显示特定图像作为水印背景?拉维,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58772913/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com