[css]float按比例三欄佈局

  • html(vue <template>)
<div class='flelf '></div>
<div class='fright '></div>
<div class='fm '></div>
  • css(vue <style>)
.flelf {
    float: left;
    width: 24.4%;
  }

  .fright {
    float: right;
    width: 24.4%;
  }

  .fm {
    margin-left: 25%;
    margin-right: 25%;
  }

明白了,要先放right的div,再放middle的,不然右邊會塌陷,先渲染了中間。css

相關文章
相關標籤/搜索