[英]jQuery - Change all URLs on page include CSS & JavaScript files
[英]Netbeans - Include CSS for all files
我用php构建了自己的模板系统。 一个简短的例子只是为了解释我的问题:
<!DOCTYPE HTML>
<html lang="de">
<head>
<link rel="stylesheet" type="text/css" href="../css/main.css" />
</head>
<body>
<?php include('body.html'); ?>
</body>
</html>
现在,当我使用Netbeans打开body.html文件时
<div class="content">
Hello
</div>
Netbeans说:找不到类内容
是否可以将css文件分配给html文件,以便Netbeans找到该类?
最好在PHP的帮助下进行拍摄,但采用相反的方式:
pgup.php
<!DOCTYPE HTML>
<html lang="de">
<head>
<link rel="stylesheet" type="text/css" href="../css/main.css" />
</head>
<body>
index.php
<?php include('pgup.php'); ?>
<div id="content" class="content">
Hello
</div>
<?php include('pgdown.php'); ?>
pgdown.php
</body>
</html>
main.css
/*(for id)*/
#content{
}
/*(or for class)*/
.content{
}
找不到课程内容:
**This means, the class named "content" is not defined or not found in HTML/CSS file(s).**
因此,可以创建一个新的CSS文件并从html页面进行引用,也可以使用标签在body.html本身中定义CSS定义。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.