麻烦老师看一下我这个错在哪里
这是主页面
<template>
<div>
<div class="abc"></div>
<p v-bind:style="[chek,changes]">sdflskfj</p>
</div>
</template>
<script>
export default {
data(){
return {
}
},
}
</script>
<style scoped>
.abc{
width: 375px;
height: 500px;
background: blue
}
</style>//这是main.js
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
// import store from './store'
import './config/rem'
Vue.config.productionTip = false
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
components: { App },
template: '<App/>'
}这是rem'.js
(function () { function a() { var b = document.documentElement.clientWidth; b = b > 750 ? 750 : b; var c = b / 750 * 100; document.getElementsByTagName("html")[0].style.fontSize = c + "px" } a(); window.onresize = a })();这是ulit里修改的部分
var px2remloader = {
loader:'px2rem-loader',
option:{
remUnit:50
}
}
// generate loader string to be used with extract text plugin
function generateLoaders (loader, loaderOptions) {
const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader,px2remloader]

最后如上图所示...设置的375px会变成5rem,这是为什么???实际画面中,375px对应的fontsize也是50px,我配置那里设置的也是50......那不应该变成7.5rem吗....已经重新启动项目过了也没用....不知道错在哪里
0
收起
正在回答
1回答
同学你好,如下,这里单词拼写错误,少了一个s哦。

若能帮助到你,望采纳。
祝学习愉快!
热门框架Vue开发WebApp 18版
- 参与学习 人
- 提交作业 209 份
- 解答问题 3299 个
本路径是通过ES6基础知识、运用Zepto、Swiper、fullPag等移动端常用工具包、以及当下流行框架Vue,结合多个实战案例,还原真实开发场景,最终实现手机端购物商城网页开发。
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星