在声明html5之后,图像不再具有样式

时间:2013-10-08 04:53:10

标签: html css html5

在我的页面开头放入我的!DOCTYPE html后,其中一张图片不再改变样式了。其他图像,但这个特殊的图像不是。我究竟做错了什么?这是代码:

图片:

<p id="Index">
        <img src="../Web Site/Pictures/Pic1.jpg" id="Pic1">
        ...
</p>

图片在p元素内。

图片的CSS:

#Pic1 {

    float: left;
    margin-right: 10px;
    height: 250;
    width: 200;
    }

段落的CSS:

#Index {

    font-size: 25px;
    font-family: "Papyrus";
    color: #22b14c;
    }

1 个答案:

答案 0 :(得分:1)

更改为此并查看是否有效

#Pic1 {
    float: left;
    margin-right: 10px;
    height: 250px;
    width: 200px;
}