2013-07-08 70 views
0

您好我的代码在这里非常简单。由于某些原因,它不会从CSS文件中提取任何内容,并将其添加到正文部分的php文件中。如果我在CSS中对p标签进行更改,它不会显示当我在php中使用P时进行的更改并进入网站,这里是我的代码。无法读取CSS文件的网页

PHP代码

<!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<!-- Created by: Sivaram Penumarty [skpenuma] --> 
<?php 
     include("style.css"); 
?> 
<head> 

<title>WireLess Networking Group US PDE</title> 
</head> 

<body> 
<h3>Ye Olde Storye</h3> 
<p><span>A</span> long time ago there was an intrepid young student who wanted to learn CSS...</p> 
</body> 
</html> 

的style.css

p { 
    font-family:Garamond; 
    font-size:16px; 
} 

h3 { 
    font-family:cursive; 
    color:#36648b; 
    text-align:center; 
} 

span { 
    color:#cc0000; 
    font-size:24px; 
} 

这是输出到我尝试运行后的网页。

p {font-family:Garamond;字体大小:16px的; } h3 {font-family:cursive;颜色:蓝色; text-align:center; } span {color:green;字体大小:24像素; } 叶奥尔德Storye 很久很久以前,有谁想要学习CSS一个勇敢的年轻学生...

正如你所看到的文本没有对齐中心叶奥尔德Storye和跨度不为A工作以及为p标签更改也没有任何改变。它还从头开始重新打印来自style.css文件的所有代码。这是为什么发生?

+0

你** **不使用PHP的包括链接到一个CSS文件,尝试一些文档 – 2013-07-08 20:49:41

+0

添加之初