Can I use CSS to reverse the display order of two elements?

后端 未结 4 702
花落未央
花落未央 2021-01-15 08:41

This sounds crazy, but bear with me. I\'m writing a page that basically consists of the following:

4条回答
  •  执念已碎
    2021-01-15 09:30

    No, there is no way to do this in pure CSS. CSS focuses on the presentation part, not the structure of the data that is being displayed.

    The next best thing that comes to mind is having duplicate content:

    ...
    ...
    ...
    ...

    and hiding the odd class in one view, evenin another.

    It's not great, and it may come with SEO side-effects in some situations, I'm not sure.

    It's the only way that comes to mind that doesn't involve server-side processing or JavaScript, though.

提交回复
热议问题