在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/ UI問答

flex布局

flex屬性

  1. flex屬性是flex-grow, flex-shrink 和 flex-basis的簡寫,默認(rèn)值為0 1 auto。后兩個屬性可選。
    建議優(yōu)先使用這個屬性,而不是單獨寫三個分離的屬性,因為瀏覽器會推算相關(guān)值
  2. flex-grow屬性定義項目的放大比例,默認(rèn)為0,即如果存在剩余空間,也不放大。
  3. flex-shrink屬性定義了項目的縮小比例,默認(rèn)為1,即如果空間不足,該項目將縮小。
  4. flex-basis屬性定義了在分配多余空間之前,項目占據(jù)的主軸空間(main size)。瀏覽器根據(jù)這個屬性,計算主軸是否有多余空間。它的默認(rèn)值為auto,即項目的本來大小。
浪婳 回答
  1. 建議參考使用Flexible實現(xiàn)手淘H5頁面的終端適配
  2. 建議參考lib-flexible源碼讀后感:

    最后給body設(shè)置font-size,作者團(tuán)隊也解釋了(原話):
    body上設(shè)置12 * dpr的font-size值,為了重置頁面中的字體默認(rèn)值,不然沒有設(shè)置font-size的元素會繼承html上的font-size,變得很大。
解夏 回答

使用flex布局,橫向排列,允許換行,高度一致,每一塊占據(jù)33.33%的寬度

離觴 回答

應(yīng)該是jquery

clipboard.png
這個效果可以通過錨操作實現(xiàn)

clipboard.png

陌南塵 回答

props傳遞,這也是大部分UI組件使用的方式。你這已經(jīng)是父子組件了當(dāng)然是采用props down, events up。
如無必要盡量少的直接操作dom,因為vue的思想數(shù)據(jù)驅(qū)動視圖,而不是直接操作.
當(dāng)然一些場景下還是有必要使用$refs的,比如獲取一個元素的寬高..

厭遇 回答

不知道你iframe代碼的結(jié)構(gòu)和內(nèi)容。嘗試下,把iframe中的內(nèi)容放到一個 .html中,然后在你需要加標(biāo)識的地方用a標(biāo)簽套你的img,把href屬性指到剛剛那個.html。

墻頭草 回答
import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Login from '@/components/Login'

import Account from '@/components/user/Account'
import Course from '@/components/user/Course'
import Order from '@/components/user/Order'

import store from './../vuex/index'

Vue.use(Router)

function guardRoute (to, from, next) {
  if (!store.state.isLogin) {
    next({ path: '/login' });
  } else {
    next()
  }
}

const vueRouter = new Router({
  routes: [
    {
      path: '/hello',
      name: 'HelloWorld',
      component: HelloWorld
    },
        {
            path: '/login',
            name: 'login',
            component: Login
        },
        {
            path: '/account',
            name: 'account',
            component: Account,
            meta: {
                needAuth: true
            }
        },
        {
            path: '/course',
            name: 'course',
            component: Course,
            meta: {
                needAuth: true
            }

        },
        {
            path: '/order',
            name: 'order',
            component: Order,
            meta: {
                needAuth: true
            }

        },
  ]
});

vueRouter.beforeEach(function (to, from, next) {
    if (to.matched.some(m => m.meta.needAuth)) { 
      guardRoute(to, from, next)
    } else {
      next()
    }
});

export default vueRouter

其實更多的是工作流程,和工作協(xié)同的區(qū)別。

愛礙唉 回答

1.通過地址欄參數(shù)傳遞
2.通過localstorage,sessionStorage等技術(shù)
跳轉(zhuǎn)前記得攜帶參數(shù)就行了

//https://mail.qq.com/cgi-bin/frame_html?sid=EJs87usyg4jSZy51&t=newwin_frame&url=%2fcgi-bin%2freadmail%3fmailid%3dZC1927-zkXnZWC5bWY8MnsgobyyP87%26need_textcontent%3dtrue%26s%3dnotify%26newwin%3Dtrue%26t%3dreadmail&r=9f2c2de4f4d1a5acaa0109db8fadf7cd

function getQueryString(name) {
var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
var r = window.location.search.substr(1).match(reg);
if (r != null) {
return unescape(r[2]);
}
return null;
}

getQueryString('sid')
"EJs87usyg4jSZy51"

圖片描述

敢試 回答

div2加overflow:scroll就行了,正常應(yīng)該是div2寬度等于ul寬度2000,多出來的40應(yīng)該是ul的margin。

朕略萌 回答

if (/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {

    //移動端

}else{

    //PC

}

敢試 回答

justify-content: space-around; 可以用 -ms-flex-pack: distribute;代替;
justify-content: space-between 可以用 -webkit-box-pack: justify; -ms-flex-pack: justify;代替

參考justify-content

柒喵 回答

如果你每次去服務(wù)器獲取15張圖片的數(shù)據(jù)相對來說消耗還是比較大的,為什么不把圖片存在一個地方,每次請求圖片的url,讓瀏覽器自己從url獲取即可,至于緩存,瀏覽器本身會自己緩存圖片,當(dāng)你在沒有清理緩存的時候,都是從本地緩存先進(jìn)行對比,如果更新才會獲取,建議你深入了解下瀏覽器的工作原理

只愛你 回答

外層再嵌套一層div,display: flex; justify-content: center; 然后修改的justify-content .page-mod .pagination { justify-content: flex-start }
不行去 http://test.cxxgame.com/tourn... 看賽事信息部分的樣式

夕顏 回答
function cell(value,row,index){
        if(row.test>=row.y){
            return '<div class="progress progress-striped active"><div class="progress-bar progress-bar-success" style="width:'+value+'" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" >'+value+'</div></div>';
        }else{
            return '<div class="progress progress-striped active"><div class="progress-bar progress-bar-info" style="width:100%" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" >'+value+'</div></div>';
        }
    }
尛憇藌 回答

說下思路吧,具體來說route4其實是組件形式實現(xiàn)的,所以實際上每一個路由都是一個單獨的組件。

基于此,只要分出兩個大的父組件,一個包括了需要權(quán)限的,一個不包括(或者在最頂級路由包括一個需要權(quán)限驗證的route和其他不要驗證的同級route,用Switch做唯一對應(yīng))。

只要在需要權(quán)限的父組件的適當(dāng)生命周期里判斷當(dāng)前用戶有無權(quán)限,無則跳轉(zhuǎn)到登錄頁即可。

神曲 回答

clipboard.png
紅色框放登錄框, 并且z-index:設(shè)置的高于canvas;阻止掉登錄框部分的默認(rèn)事件;保證canvas 不會影響到登錄功能;其次就是登錄框除紅色框部分不能有元素壓蓋canvas;不然就會失去canvas的交互;
究其原因: 結(jié)構(gòu)樣式問題;

忘了我 回答
<style>
  .flex {
    display: flex;
    flex-direction: column;
    height: 100vh
  }
  .flex-item {
    flex: 1;
    overflow: auto;
  }
</style>
<div class="flex">
  <div>top</div>
  <div class="flex-item"></div>
  <div>bottom</div>
</div>