weex - Android 原生Vue.js 使用 justify-content: flex-end; 不起作用
問題描述
Android 原生,Vue.js 的屬性 justify-content: flex-end; 外面套兩層 <p>,就不起作用。備注:web 下是好的。
見代碼:<template><p class='page'>
<p class='con'> <p class='title'><text class='titleText'>標(biāo)題 ... ...</text> </p> <p class='validate'><text class='validateText'>內(nèi)容 ... ...</text> </p></p>
</p></template><style scoped>
.page { }.con {background-color:#CCCCCC; flex-direction: row;}.title{ margin: 5px; flex-direction: column; justify-content: flex-end; background-color:#FFFFFF;}.titleText{ font-size: 28px; background-color:red;}.validate{ margin: 5px; background-color:#CCCCCC; height: 100px; flex:1;}.validateText {font-size: 24px; margin:5px;}
</style>
問題解答
回答1:看你的代碼,猜想是想讓“標(biāo)題”置底。首先justify-content屬性不是vue.js的,是Flexbox的。你可以嘗試這樣寫:
.title{ margin: 5px; flex-direction: column;//默認(rèn)就是column 不需要寫 justify-content: flex-end;//主軸方向上排列在容器后面,可以考慮不寫,用下面 align-items:flex-end;//下對(duì)齊 background-color:#FFFFFF;}
如果想要多人回答,建議將效果圖貼出來。
回答2:先得 display為flex,才能使用flexbox的屬性,不然是display:block
相關(guān)文章:
1. MySQL的聯(lián)合查詢[union]有什么實(shí)際的用處2. PHP訂單派單系統(tǒng)3. 怎么能做出標(biāo)簽切換頁的效果,(文字內(nèi)容隨動(dòng))4. mysql - sql 左連接結(jié)果union右連接結(jié)果,導(dǎo)致重復(fù)性計(jì)算怎么解決?5. 網(wǎng)頁爬蟲 - python 爬取網(wǎng)站 并解析非json內(nèi)容6. mysql 遠(yuǎn)程連接出錯(cuò)10060,我已經(jīng)設(shè)置了任意主機(jī)了。。。7. php多任務(wù)倒計(jì)時(shí)求助8. 數(shù)組排序,并把排序后的值存入到新數(shù)組中9. 默認(rèn)輸出類型為json,如何輸出html10. mysql時(shí)間格式問題
