CSS Header p元素不会改变颜色 [英] CSS Header p element will not change color

查看:112
本文介绍了CSS Header p元素不会改变颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 <  !DOCTYPE     html  >  

< html >

< head >
< meta charset = utf-8 >
< title > 美丽的秘密< / title >
< link rel = stylesheet href = css / style.css >
< span class =code-keyword><
/ head >

< body >

< header >
< h1 > 示例标题< / h1 >
< p > 网站口号实施例<跨度类= 代码关键字 >< <跨度类= 代码leadattribute > / p <跨度类= code-keyword>>
< / header >

< p <跨度类= 代码关键字>> Herbbssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss。
< / p >



< / body >

< / html >







AND



  h1  {
颜色 orange;
text-align center;
}
header p {
颜色 蓝色;
}













我想做的就是将标题p {}颜色更改为我想要的颜色但看起来任何标题{}都不适用于某些原因。希望看到我搞砸了的代码,或者如果没有,也许一些软件,我很想念我只是不明白。

解决方案
在这些类型通常情况下人们陷入困境的使用样式表的名称或其扩展名



首先检查名称应该是style.css而不是检查扩展名意味着它应该在文件夹css下


<!DOCTYPE html>

<html>

<head>
    <meta charset="utf-8">
    <title> Secret Of Beauty</title>
    <link rel="stylesheet" href="css/style.css">
</head>

<body>

    <header>
        <h1>Example Heading</h1>
        <p>Website Slogan Example</p>
    </header>

    <p>Herbbssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss.
    </p>



</body>

</html>




AND

h1{
    color:orange;
    text-align:center;
}
header p{
    color:blue;
}







All I want to do is change the header p {} color to whatever I want but it seems anything with header {} does not tend to work for some reason. wanted to see where I messed up the code or if not maybe some software I am missing I just do not understand.

解决方案

In these type of scenario people usually mess up with either the name of stylesheet or its extension

check the name first it should be style.css than check extension means it should be under folder css


这篇关于CSS Header p元素不会改变颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆