如果你不介意涉及 JS:
http://jsfiddle.net/77NwN/2/
HTML:
<div class="main">
<aside class="float">List of winners</aside>
<article>
<p>Here's the article</p>
<p>Article text that can wrap around <aside></p>
<p>Article text that can wrap around <aside></p>
</article>
</div>
CSS:
@media {
.main aside.float {
display:none;
}
}
@media (min-width:350px) {
.main aside.under {
display:none;
}
.main aside.float {
display:initial;
float:right;
width:28%;
}
}
JS:
window.onload=function(){
var aside=document.querySelector("div.main aside.float");
aside=aside.cloneNode(true);
aside.className="under";
document.querySelector("div.main").appendChild(aside);
};
如果您不介意使用flexbox
:
(灵感来自@dstorey)
警告:仅在 Chrome 26 桌面和 Firefox 21 桌面上测试。兼容表/ MDN 指南。
http://jsfiddle.net/77NwN/3/
HTML:
<div class="main">
<aside>List of winners</aside>
<article>
<p>Here's the article</p>
<p>Article text that can wrap around <aside></p>
<p>Article text that can wrap around <aside></p>
</article>
</div>
CSS:
@media {
.main aside {
float:right;
width:28%;
}
}
@media (max-width:350px) { /* notice I change min-width to max-width */
.main {
display:-webkit-flex;
display:flex;
-webkit-flex-direction:column;
flex-direction:column;
}
.main article {
-webkit-order:1;
order:1;
}
.main aside {
-webkit-order:2;
order:2;
float:initial;
width:initial;
}
}
不涉及 JS。
我不确定“旧语法”到底是什么,因为当他们讨论这个话题时,我并没有太在意这个话题......