Best Practices: CSS or Themes in ASP.NET?

后端 未结 7 888
迷失自我
迷失自我 2021-02-13 07:03

When should I use ASP.NET Themes, and when should I use CSS? What are the advantages or disadvantages of using one over the other?

7条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-13 07:30

    You should combine them. Use your css files in the theme folder for your normal styling of all the html elements in your website (include all the generated elements).

    In the skin file of a control, you can set the default css class. Other properties like the layout and default behavior of the elements (sample: calender control) are editable here too.

    Skin files are good for all layout specific configuration you can't easily do with css, but with the .net properties of the controls.

提交回复
热议问题