10月
25
1、去掉<style scoped>中的scoped(不建议使用,1、不是全局组件用到,这样全局加载导致影响加载速度。2、可能影响到其它组件样式)
<style>
.test img{display:block;width:100%;height:100%;}
.test i{ font-size:14px;color:#333333; }
</style>
2、第二种方式使用 >>>(没有使用less,sass,stylus)
<style>
.test >>> img{display:block;width:100%;height:100%;}
.test >>> i{ font-size:14px;color:#333333; }
</style>
3、第三种可以使用/deep/ (使用了less,sass,stylus)
<style>
.test /deep/ img{display:block;width:100%;height:100%;}
.test /deep/ i{ font-size:14px;color:#333333; }
</style>
评论列表(有0条评论)