Conditional Comments within CSS

后端 未结 3 1077
天涯浪人
天涯浪人 2021-02-10 03:15

I am currently developing a theme for a homepage but ran into a few problems. For whatever reason I have no access to editing the html code itself, and I need to write custom .c

3条回答
  •  一整个雨季
    2021-02-10 03:56

    I had this problem in my CMS application so...

    Create a container div have it's class the browser name and version to be looks like

    ///////

    and do you CSS classes like

    .your_custom_elements{common styles between versions}
    .ie_6_0 .your_custom_elements{do somthink for old versions}
    .ie_9_0 .your_custom_elements{do somthink for new versions}
    

    UPDATE 1

    or like

    ///

    and CSS like

    #mainframe{common styles between versions}
    #mainframe.ie_6_0{do somthink for old versions}
    #mainframe.ie_9_0{do somthink for new versions}
    

    ie_6_0: as your user browser name and version must request it and add it by code.

提交回复
热议问题