css - Problems using class selectors
给我你的怀抱
给我你的怀抱 2017-05-24 11:36:28
0
5
984

1. I just started to learn HTML and CSS by myself. I wanted to define two fonts in one block. I used the class selector, but after defining it, I didn’t see any change in the font on the page (it was still the default size and color). ), is it the selector or the code that is wrong? இ௰இ

2This is the html code

<p id="container">

       <p id="header">
          <p id="Love Live Sunshine">
              <p>
                                <h1>Love Live Sunshine</h1>
                                <hr width="960&">
                                <p>这是一个标题!!!</p>
              </p>
           </p> 
        </p>

This is the CSS

Please forgive me

给我你的怀抱
给我你的怀抱

reply all(5)
Ty80

Use ID less, and don’t use it so long because ID is unique, so long is meaningless. Then don’t add dots in front of h1 and p, dots are for class selection

给我你的怀抱

Please use - instead of spaces
There is also this called ID selector and class selector is class

曾经蜡笔没有小新

Do not include spaces in the id

世界只因有你

Just change . to a space = =
. The beginning is the class selector. You need to write CSS for the label here. There is no need for any prefix in front of the label

曾经蜡笔没有小新

In addition to clear grammar specifications and selector properties, remember to introduce style files

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template