php引入css文件出错,但是网页已经有样式了

WBOY
Libérer: 2016-06-20 12:26:17
original
1243 Les gens l'ont consulté

求助:php引入css文件出错,但是网页已经有样式了,错误代码如下


回复讨论(解决方案)

代码如下:php代码
nbsp;html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



<!-- {Webname} -->



top

header

nav

search

user

news

pic

rec

sidebar-right

picnews

newslist

link

footer


网页已经有CSS的样式了,但是报ERROR,以下为css代码:
@CHARSET "UTF-8";
body,h1,h2,h3,p,form,ul,li,dl,dt,dd {
padding:0;
margin:0;
}
body {
width:960px;
margin:0 auto;
background:#fff;
}
#top {
height:26px;
background:red;
margin:0 0 10px 0;
}
#header {
height:80px;
background:green;
margin:0 0 10px 0;
}
#nav {
height:35px;
background:navy;
}
#search {
height:35px;
background:maroon;
margin:0 0 10px 0;
}
#user {
width:270px;
height:400px;
background:orange;
float:right;
margin:0 0 10px 0;
}
#news {
width:400px;
height:400px;
background:blue;
float:right;
margin:0 10px 10px 0;
}
#pic {
width:270px;
height:195px;
background:green;
float:left;
margin:0 0 10px 0;
}
#rec {
width:270px;
height:195px;
background:red;
float:left;
margin:0 0 10px 0;
}
#sidebar-right {
width:270px;
height:835px;
background:red;
float:right;
margin:0 0 10px 0;
}
#picnews {
width:680px;
height:200px;
background:yellow;
float:left;
margin:0 0 10px 0;
}
#newslist {
width:680px;
height:625px;
background:pink;
float:left;
margin:0 0 10px 0;
}
#link {
width:960px;
height:110px;
background:orange;
float:left;
margin:0 0 10px 0;
}
#footer {
width:960px;
height:40px;
background:blue;
float:left;
}

一个中文都没有,却还要声明为 utf-8
BOM 头在 utf-8 声明之前,出点错也是正常的

一个中文都没有,却还要声明为 utf-8
BOM 头在 utf-8 声明之前,出点错也是正常的




大神,,我确实把 charset=utf-8" 去除了,就没有错误了,但是您说的BOM头问题,我的是无BOM头UTF8编码啊。。。。。
source:php.cn
Déclaration de ce site Web
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn
Tutoriels populaires
Plus>
Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!