Firefox 不显示颜色,IE 显示正确
Firefox wont show colors, IE shows correct
我只是 CSS 的初学者,所以我有一个问题 我写了一个简单的代码,IE 显示正确,但是 Firefox 没有,我该如何解决这个问题?代码有什么问题?谢谢你。正如我所说,我是初学者,很抱歉提出愚蠢的问题。 :)
这是代码
h3 {
color: "blue";
font-size: "20px";
font-family: "verdana"
}
p {
color: "white";
background: "blue";
font-family: "helvetica";
text-indent: "1 cm"
}
<html>
<head>
<title>Pakopinių stilių (CSS) naudojimo pavyzdys</title>
<link rel="stylesheet" href="stiliai.css" type="text/css">
</head>
<body>
<h3>Trečiojo lygio antraštė</h3>
<p>Naujas pastraipų stilius.</p>
</body>
</html>
第一个是CSS我叫它stiliai.css,第二个是html叫index.html
删除包围颜色的引号。指定颜色时不需要引号。
改变
h3 {color:"blue"; font-size:"20px"; font-family: "verdana"}
to
h3 {color:blue; font-size:"20px"; font-family: "verdana"}
您的问题在于您在 css 中使用 "
。 不需要:
h3 {
color: blue;
font-size:20px;
font-family: verdana
}
p {
color: white;
background: blue;
font-family: helvetica;
text-indent: 10px; /*cm are not commonly used in css*/
}
<html>
<head>
<title>Pakopinių stilių (CSS) naudojimo pavyzdys</title>
<link rel="stylesheet" href="stiliai.css" type="text/css">
</head>
<body>
<h3>Trečiojo lygio antraštė</h3>
<p>Naujas pastraipų stilius.</p>
</body>
</html>
只有在使用 html 之类的东西时才需要使用 "
。
它们未在 css 文件中使用。
我只是 CSS 的初学者,所以我有一个问题 我写了一个简单的代码,IE 显示正确,但是 Firefox 没有,我该如何解决这个问题?代码有什么问题?谢谢你。正如我所说,我是初学者,很抱歉提出愚蠢的问题。 :) 这是代码
h3 {
color: "blue";
font-size: "20px";
font-family: "verdana"
}
p {
color: "white";
background: "blue";
font-family: "helvetica";
text-indent: "1 cm"
}
<html>
<head>
<title>Pakopinių stilių (CSS) naudojimo pavyzdys</title>
<link rel="stylesheet" href="stiliai.css" type="text/css">
</head>
<body>
<h3>Trečiojo lygio antraštė</h3>
<p>Naujas pastraipų stilius.</p>
</body>
</html>
第一个是CSS我叫它stiliai.css,第二个是html叫index.html
删除包围颜色的引号。指定颜色时不需要引号。
改变
h3 {color:"blue"; font-size:"20px"; font-family: "verdana"}
to
h3 {color:blue; font-size:"20px"; font-family: "verdana"}
您的问题在于您在 css 中使用 "
。 不需要:
h3 {
color: blue;
font-size:20px;
font-family: verdana
}
p {
color: white;
background: blue;
font-family: helvetica;
text-indent: 10px; /*cm are not commonly used in css*/
}
<html>
<head>
<title>Pakopinių stilių (CSS) naudojimo pavyzdys</title>
<link rel="stylesheet" href="stiliai.css" type="text/css">
</head>
<body>
<h3>Trečiojo lygio antraštė</h3>
<p>Naujas pastraipų stilius.</p>
</body>
</html>
只有在使用 html 之类的东西时才需要使用 "
。
它们未在 css 文件中使用。