0
<html>
    <head>
        <title>Homepage</title>

        <style type="type/css">
        body {
            font-family: Arial;
            color:#FFFFFF;
            background-attachment:fixed;
        }
        h1 {
            font-family:Arial;
            font-size:49px;
        }
        h2 {
            font-family:Papyrus, Times New Roman;
        }
        h3 {
            font-family:Times New Roman:
        }
        </style>
    </head>

这就是我写头的方式。我的网站没有做任何风格。这段代码有什么问题吗?当我把它放在浏览器中并查看源代码时,它没有显示正文、h1、h2、h3 和标签,它看起来就像纯文本。我怎样才能解决这个问题。

4

2 回答 2

1

The style type should be "text/css" not "type/css", though you really don't need it.

    <head>
        <title>Homepage</title>

        <style type="text/css">
            body {
                font-family: Arial;
                color:#FFFFFF;
                background-attachment:fixed;
            }
            h1 {
                font-family:Arial;
                font-size:49px;
            }
            h2 {
                font-family:Papyrus, Times New Roman;
            }
            h3 {
                font-family:Times New Roman:
            }
        </style>
    </head>
于 2013-10-16T20:54:10.163 回答
0
font-family:Times New Roman:

应该

    font-family:Times New Roman;

在旁注......看看记事本++

; 不是 :

于 2013-10-16T21:13:33.227 回答