Is it possible to create inline pseudo styles?

前端 未结 5 1911
日久生厌
日久生厌 2020-12-03 10:33

Is it possible to create inline pseudo styles?

For instance, can I do something like the following?



        
5条回答
  •  情深已故
    2020-12-03 11:37

    I would dynamically create a CSS file as I parse all the controls, and I would add a server side attribute to the controls that contained the hover or other pseudoclass styles.

    Click!
    

    Your code can look for these attributes and generate a css file on the fly

    #a1:hover {
      color:blue
    }
    

    I don't know if .NET allows for you to do this type of parsing of the attributes, but I do something similar in a framework I created for php.

提交回复
热议问题