Is it bad practice to comment out single lines of CSS with //?

前端 未结 11 1712
梦如初夏
梦如初夏 2020-12-01 02:45

I have recently started using // to \"comment\" out single lines of CSS code. I understand that I am not actually commenting out the line; I am just breaking it

11条回答
  •  攒了一身酷
    2020-12-01 03:22

    Comment in HTML:

    
    
    

    Comment in JavaScript:

    Single-line comment:

    Two slashes, "//", in front of the code:

    //document.write("Try this");
    

    Multi-line comment:

    
    

    Comment code in CSS:

    /*
    .tblemp {
    color:red; }
    
    */
    

    More details

提交回复
热议问题