block要素を上下逆転させる方法はありますか??
具体的には、メディアクエリで幅991px以下の時のみ、画像のtextとimgを逆に配置したいです。幅992px以上の時は図のままの配置にしたいです。
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"/> <title>わたしたちについて</title> <link rel="stylesheet" href="style.css" type="text/css"> <style> .body{ font-family: "游ゴシック", "ヒラギノ角ゴ ProN", "メイリオ", "MS Pゴシック", sans-serif;/*https://willcloud.jp/knowhow/font-family/#font-family*/ } .Ourvision{ margin-top: 50px; padding: 0 10vw; } .Ourvision_title p { font-size: 40px; font-weight: bold; text-align: left; padding: 0; /*margin-top: 30px;*/ } .Ourvision_title p:first-child { margin-block-end: -40px; } .Ourvision_title p:last-child { margin-block-end: -10px; } .Ourvision_title span { font-size: 20px; text-align: center; color: #73683b; line-height: 0px; margin: 0px; padding: 0; } @media screen and (min-width: 992px){/*PC版*/ .Ourvision_set1{ margin-top: 50px; padding: 0 10vw; display: flex; justify-content: center; } .Ourvision_img1 img{ width: 300px; height: 200px; margin-right: 10px; } .Ourvision_textbox1{ margin-left: 10px; padding-top: 40px; } .Ourvision_textbox1 p{ font-size: 18px; line-height: 18px; font-weight: bold; color: red; } .Ourvision_set2{ margin-top: 50px; padding: 0 10vw; display: flex; justify-content: center; } .Ourvision_img2 img{ width: 300px; height: 210px; margin-left: 10px; } .Ourvision_textbox2{ margin-left: 10px; padding-top: 40px; } .Ourvision_textbox2 p{ font-size: 18px; line-height: 18px; font-weight: bold; color: red; } } @media screen and (max-width: 991px){/*小さいとき*/ .Ourvision_set1{ display: block; } .Ourvision_img1 img{ width: 250px; height: 167px; display: block; margin: auto; margin: auto; } .Ourvision_textbox1 p{ font-size: 16px; margin-left: 10px; line-height: 18px; font-weight: bold; color: red; display: flex; justify-content: center; align-items: center; } .Ourvision_set2{ display: block; position: relative; } .Ourvision_img2 img{ width: 250px; height: 175px; display: block; margin: auto; margin: auto; } .Ourvision_textbox2 p{ font-size: 16px; margin-right: 10px; line-height: 18px; font-weight: bold; color: red; display: flex; justify-content: center; align-items: center; } } </style> </head> <body> <div class="Ourvision"> <div class="Ourvision_set1"> <div class="Ourvision_img1"> <img src="image/600420.png"> </div> <div class="Ourvision_textbox1"> <p>あああああああああ</p> <p>あああああああああああああああああ</p> </div> </div> <div class="Ourvision_set2"> <div class="Ourvision_textbox2"> <p>いいいいいいいいいいい</p> <p>いいいいいいいいいいいいいいい</p> </div> <div class="Ourvision_img2"> <img src="image/600400.png"> </div> </div> </div> </body>
以上よろしくお願いいたします。
flex-direction:column-reverse で出来ないですか?

回答2件
あなたの回答
tips
プレビュー