Tocas: 將網格系統的響應式寬度自動向上相容

Created on 10 Mar 2018  ·  5Comments  ·  Source: teacat/tocas

不曉得我是不是用錯方法
有沒有方法可以從 tablet 以上指定一種寬度呢?

也有試過改成 tablet or large device
好像行不通

下方是指定 tabletcomputer 的比較
遊樂場:https://goo.gl/RbyzPM

image

<div class="ts grid">
    <div class="four wide tablet eight wide mobile column"><div class="ts inverted primary segment"></div></div>
    <div class="four wide tablet eight wide mobile column"><div class="ts inverted primary segment"></div></div>
    <div class="four wide tablet eight wide mobile column"><div class="ts inverted primary segment"></div></div>
    <div class="four wide tablet eight wide mobile column"><div class="ts inverted primary segment"></div></div>

    <div class="four wide computer eight wide mobile column"><div class="ts inverted positive segment"></div></div>
    <div class="four wide computer eight wide mobile column"><div class="ts inverted positive segment"></div></div>
    <div class="four wide computer eight wide mobile column"><div class="ts inverted positive segment"></div></div>
    <div class="four wide computer eight wide mobile column"><div class="ts inverted positive segment"></div></div>
</div>
🎨 CSS 👬 使用問題 💡 改進提案 💬 討論

Most helpful comment

我問問,預期的效果應該是像下面這樣嗎?

2018-03-26 7 09 18

現在新的做法是會向上相容。

例如: four wide tablet two wide mobile

  • 在電腦上觀看會是 four wide
  • 平板也是 four wide
  • 行動裝置則是 two wide

All 5 comments

目前找到的解法是

<div class="four wide computer four wide tablet eight wide mobile column">

簡單說就是:應該要追加一個 mobile 以上,給 tabletcomputer 共享的 wide 欄位寬度嗎。

當初確實有想到這一點,不過看到 Semantic UI 沒什麼人抱怨,

所以就乾脆直接寫成 four wide computer four wide tablet 了。

four wide tablet or large device 感覺也有點夭壽長跟混淆,看來需要一個好名稱⋯⋯。

我問問,預期的效果應該是像下面這樣嗎?

2018-03-26 7 09 18

現在新的做法是會向上相容。

例如: four wide tablet two wide mobile

  • 在電腦上觀看會是 four wide
  • 平板也是 four wide
  • 行動裝置則是 two wide

現在才看到 抱歉 😅
是這個想法沒錯

這同時也解決了原本大型螢幕需要額外指定的問題
感謝 🙏

Was this page helpful?
0 / 5 - 0 ratings