search

Home  >  Q&A  >  body text

Which folder path in the thinkphp framework does the url in background-image:url("") correspond to?

<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="__CSS__/bootstrap.min.css" rel="stylesheet">
    <style type="text/css">
        body{
            background-image:url("/images/t.jpg");
            background-size:100% 100%; 
            background-attachment:fixed;
        }
        #login_box{
            padding: 35px;
            background: #0066FF;
            color: #fff;
        }
        #login_title{
            color: #000000;
        }
    </style>
</head>
如上代码是thinkphp框架中的一个html,其中的url和thinkphp中的文件夹路径怎么对应才能把图片加载出来?
我应该在什么地方建立文件夹存放图片?什么是相对路径和绝对路径?区别在哪里?


二十三度二十三度2129 days ago1279

reply all(2)I'll reply

  • 澳

    2019-03-18 09:52:38

    The picture should be placed in the same folder as the HTML code. Create a new image folder and place the picture in the image folder using a relative path; the absolute path is the path starting from the drive letter; the relative path is the path starting from the current file location. Path where path starts

    reply
    0
  • Cancelreply