<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body >
<div style="background-image: url('C:\Program Files\JetBrains\PhpStorm 2017.3\mn.jpg')">你好</div>
</body>
</html>
漫步2018-08-21 09:25:51
I am also a beginner, and I have two understandings about this problem
The first one: the picture path, you need to make sure that the picture path is indeed correct, and generally we use relative paths instead Non-absolute path
Second: Your div does not define width and height, so I personally think it is normal that the background is not displayed
秋香姐家的小书童2018-08-15 09:36:10
Picture background Did you put the C drive?
The only reason why the background does not appear is that the path is incorrect. Check the path.