How to swap sides of 2 elements (one with float:left, the other is with float:right)

后端 未结 1 1198
小蘑菇
小蘑菇 2021-01-27 10:06

I have a website with an image on one side, and text on the other. This is how it looks: \"enter

相关标签:
1条回答
  • 2021-01-27 11:05

    Besides changing the html structure u can use flexbox to achieve it with css:

    #container {
      display: flex;
      flex-flow: column;
    }
    #divA {
      order: 2;
    }
    #divB {
       order: 1;
    }
    
    0 讨论(0)
提交回复
热议问题