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

鍍金池/ 問(wèn)答/HTML5  HTML/ vue scoped html 樣式無(wú)效

vue scoped html 樣式無(wú)效

登錄頁(yè)用了單獨(dú)的樣式,所以我想給登錄頁(yè)加 scoped 用來(lái)作用于當(dāng)前頁(yè)面,但是html的效果沒(méi)有了,小級(jí)別的樣式可以

這個(gè)無(wú)效了
@media screen and (min-width: 1600px) {
  html {
    font-size: 100px;
  }
}

這樣的還有效:
.container {
  width: 100%;
  position: absolute;
  top: 43%;
  transform: translateY(-50%);
}
回答
編輯回答
不歸路

@廈冰 說(shuō)的對(duì),這么寫(xiě)就可以了。

<style>
@media screen and (min-width: 1600px) {
  html {
    font-size: 100px;
  }
}
</style>
<style lang="scss" scoped>
.container {
  width: 100%;
  position: absolute;
  top: 43%;
  transform: translateY(-50%);
}
</style>
2017年12月18日 01:37
編輯回答
愚念

scope的沒(méi)辦法控制組件之外的的元素的屬性

2017年9月7日 10:01
編輯回答
悶油瓶

當(dāng)前組件:

    <template>
        <div class="page"></div>
    </template>

添加scoped的話,你只能控制.page{width:100px;}及其內(nèi)部的樣式,像這種body,html需要在全局進(jìn)行設(shè)置;并且你若是在全局樣式中寫(xiě)了另一個(gè).page{width:50px;},也會(huì)影響到當(dāng)前頁(yè)面的.page

2017年6月6日 21:29