gpt4 book ai didi

html - 我无法使用 css 为背景设置图像

转载 作者:行者123 更新时间:2023-11-28 16:44:48 25 4
gpt4 key购买 nike

我有一个 laravel 5 元素,我想在其中设置和自定义图像作为背景,但我就是做不到。我可以将背景设置为一种颜色 - 这很好用,但当我使用图像时却不行...

这是我的代码:

<!DOCTYPE html>
<html>
<head>
<title>title</title>

<link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet" type="text/css">

<style>
body{
background: url("/resources/assets/images/anders.png") no-repeat;
}
</style>

</head>
<body>
@yield('content')
</body>
</html>

最佳答案

使用 .在资源之前。

body{
background: url("./resources/assets/images/anders.png") no-repeat;
}

关于html - 我无法使用 css 为背景设置图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33334450/

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