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

鍍金池/ 問答/ HTML問答

這是CSS優(yōu)先級問題
首先需要明白CSS的background其實(shí)是一種省略的寫法,參見https://www.w3schools.com/css...
由于
div > .oUl >li的優(yōu)先級比li:nth-child(3)優(yōu)先級要高
因此li:nth-child(3)中定義的background-position其實(shí)會被div > .oUl >li中的background所覆蓋

故人嘆 回答

1.前端自己判斷:登陸之后往cookie或者localstorage存值,每次先判斷是否本地有值再決定跳不跳登陸頁
2.后臺返個是否登陸狀態(tài)

荒城 回答

定一個全局變量加在所有src中,或者把所有圖片設(shè)為背景圖寫在css中

你好,你這個點(diǎn)擊下一張有用了嗎? 怎么解決的。我現(xiàn)在碰到了相同的問題,點(diǎn)擊下張沒有用

大濕胸 回答

根據(jù)你的描述,那就不要在點(diǎn)擊#uploadAction的函數(shù)里提交表單吧

枕頭人 回答

上次遇到這個問題,估計和你的一樣,問了問后端大神,給我解決了,可是我不知道原理是什么。給你貼出代碼,你看看吧。

<script>
    let treeData = [
        {
            id: 1,
            sub: [
                {
                    id: 2,
                    sub: [
                        {
                            id: 12,
                            sub: [
                                {
                                    id: 13
                                },
                                {
                                    id: 14
                                }
                            ]
                        },
                        {
                            id: 3,
                            sub: [
                                {
                                    id: 4,
                                },
                                {
                                    id: 9,
                                    sub: [
                                        {
                                            id: 10,
                                        },
                                        {
                                            id: 11
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            id: 7,
                            sub: [
                                {id: 8},
                            ]
                        }
                    ]
                },
                {
                    id: 5,
                    sub: [
                        {id: 6},
                    ]
                }
            ]
        },
        {
            id: 100
        }
    ]

    let currentId = 10  // 當(dāng)前id
    let arr = [] // 定義數(shù)組,存放當(dāng)前id的直系父ids
    function getParentsIds(data) {
        for (let i = 0; i < data.length; i++) {
            let temp = data[i]
            if (temp.id == currentId) {
                arr.push(temp.id);
                return 1
            }
            if (temp && temp.sub && temp.sub.length > 0) {
                let t = getParentsIds(temp.sub)
                if (t == 1) {
                    arr.push(temp.id)
                    return 1
                }
            }
        }
    }
    getParentsIds(treeData)
    console.log(arr)

</script>
巴扎嘿 回答

自執(zhí)行或者立即調(diào)用的函數(shù)表達(dá)式
簡單理解,第一,函數(shù)加括弧()表示一個表達(dá)式,有兩種寫法都可以(對于達(dá)到的效果沒什么區(qū)別):

// 第一種
(function () { /* code */ } ());  
// 第二種
(function () { /* code */ })();

其實(shí),很多書上有些,只要你讓解析器認(rèn)為這是一個表達(dá)式,那么都會執(zhí)行,比如一元操作符:

+function () { /* code */ } ();
-function () { /* code */ } ();
!function () { /* code */ } ();
~function () { /* code */ } ();

關(guān)于replace第二個參數(shù)是函數(shù)
推薦讀一下官方文檔。
首先,這個方法的參數(shù)是沒有固定個數(shù)的,不過有一定規(guī)則

  • 第一個參數(shù)是每次正則匹配到的字符串,這個是固定的。上面的a就是每次正則匹配到的
  • 后續(xù)是捕獲組匹配到的內(nèi)容,子表達(dá)式。上面的b 就是前面正則括弧里面的內(nèi)容
  • 接下來是 匹配字符串開始的下標(biāo)索引index
  • 再接下里是源字符串
脾氣硬 回答

1、所有函數(shù)都是Function的實(shí)例(不考慮箭頭函數(shù)),所以所有函數(shù)的[[prototype]]原型都指向Function.prototype。
2、每一個prototype對象都有1個constructor屬性指向構(gòu)造它的函數(shù)
3、函數(shù)實(shí)例本身并沒有constructor屬性,便沿著原型鏈去尋找,直到發(fā)現(xiàn)Function.prototype內(nèi)有constructor屬性。
4、根據(jù)2,F(xiàn)unction.prototype.constructor指向Function。
5、可能奇怪的點(diǎn)在于Function本身也是Function的實(shí)例,F(xiàn)unction的[[prototype]]原型指向Function.prototype,設(shè)計者可能是為了保持函數(shù)特性一致而設(shè)計的,畢竟凡事必得有始有終嘛(跑。

吢涼 回答

json[]Object屬性訪問的形式,數(shù)組也是Object

let json = { 'a': 1 };
console.log(json['a']);
let array = [];
console.log(array['length'])
萌二代 回答

MongoDB支持全文索引,但對于中文的支持只在企業(yè)版中有。

怪痞 回答

webpack config


{
            test: /\.css$/,
            use: [
              require.resolve('style-loader'),
              {
                loader: require.resolve('css-loader'),
                options: {
                  importLoaders: 1
                }
              },
              {
                loader: require.resolve('postcss-loader')
              }
            ]
          },
          {
            test: /\.less$/,
            exclude: [/src/],
            use: [
              require.resolve('style-loader'),
              {
                loader: require.resolve('css-loader'),
                options: {
                  importLoaders: 1
                }
              },
              {
                loader: require.resolve('postcss-loader')
              },
              {
                loader: require.resolve('less-loader'),
                options: { modifyVars: { '@primary-color': '#1DA57A' } }
              }
            ]
          },
          {
            test: /\.less$/,
            exclude: [/node_modules/],
            use: [
              require.resolve('style-loader'),
              {
                loader: require.resolve('css-loader'),
                options: {
                  modules: true,
                  localIdentName: '[local]_[hash:base64:8]'
                }
              },
              {
                loader: require.resolve('postcss-loader')
              },
              {
                loader: require.resolve('less-loader'),
                options: { modifyVars: { '@primary-color': '#1DA57A' } }
              }
            ]
          },

看了你的代碼,是采用css module,就要分開配置。antd less要全局編譯。

話寡 回答

css文件放上邊啊

艷骨 回答

沒有人能回答嗎??

膽怯 回答

可以看這里,推薦使用下面的import方式。require.ensure是老式寫法。

function getComponent() {
  // 這個注釋是必要的,根據(jù)配置生成的chunk name是lodash.chunk.js,移除注釋會變成[id].chunk.js
  // 而且生成的chunk會在header標(biāo)簽中被引入
  return import(/* webpackChunkName: "lodash" */ 'lodash')
  .then(_ => {
    const element = document.createElement('div');
    element.innerHTML = _.join(['Hello', 'webpack!'], ' ');
    return element;
  })
  .catch(error => 'An error occurred while loading the component');
}  
 

getComponent().then(element => {
  document.body.appendChild(element);
})
鐧簞噯 回答

也可以考慮將父元素設(shè)置為display: table-cell; text-align: center

風(fēng)畔 回答

沒有,所以你得自己寫適配的功能。比較推薦使用vw來進(jìn)行適配。scss端的代碼如下:,輸入設(shè)計稿中的寬高,可以直接算出來在真機(jī)上的寬高。假設(shè)設(shè)計稿的寬度為720;可以看下我的小項目:hw-basic

$screen_width=720;
@function rem(width){
@return (width/$screen_width)*100vw
}