thinkphp的css引用不进来的解决办法:1、查看js,css以及img等文件的存放位置;2、修改引用css的方式为“”即可。
本文操作环境:Windows7系统、thinkphp v5.1版、Dell G3电脑。
thinkphp的css引用不进来怎么办?
thinkphp5引用外部css,js路径确实没错,为什么没有反应?
弄了一早上,才发现原因,分享给大家。大概举个css例子解释一下:
1.我们知道,我们所写的js、css、img等文件是放在publi/static里,
下面是具体位置图:
三个代码如图所示: index.html index.php index.css
html
nbsp;html> <meta> <meta> <meta> <title>Document</title> <style> p{ color: red; } </style> <link><p>{$name}欢迎你</p>
网友留言2