配置文件
原本的css文件
html, body{
width: 100%;
height: 100%;
}
.root{
width: 100%;
height: 100%;
}
//stage
.stage{
position: relative;
width: 100%;
height: 680px;
}
//image
.img-sec{
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
background: #ddd;
}
//controller
.controller-nav{
position: absolute;
left: 0;
bottom: 30px;
z-index: 101;
width: 100%;
text-align: center;
}
样式文件已插入页面
.index_root___3csDm,这个码是怎么生成的?只有html和body的样式应用上了,其余没有,请问是怎么回事?
因为你开启了
css-module
, 把css-loader的options去掉试试如果要使用css-module的话,就要使用css-in-js的语法,比如
之后直接使用styles来访问css里面的类名
关于css-module的有缺点就不说了,网上很多