How can i apply css stylesheet to single specific element?

后端 未结 4 1574
情深已故
情深已故 2020-12-21 14:00

I am new to web development, I have tried css stylesheet with simple HTML element and it worked well, when i specified element name:

label {
    color: green         


        
4条回答
  •  青春惊慌失措
    2020-12-21 14:35

    There's lots of ways to accomplish this. There's lots of css selectors like ID, classes... See css selectors reference

    Best way to achieve what you want is to use classss. See classes

    .red {
          color: red;
    }
    .blue {
          color: blue;
    }
    
    
    
        

提交回复
热议问题