vue组件化应用,近期写的单个组件里有一个的渲染部分样式渲染不上去

因为同结构的其他组件均没有问题,所以排除是.vue文件结构的问题,应该是<style>内部的问题

<style lang="stylus" type="text/stylus" scoped>
.recom
height : 3.5rem
padding-bottom : 40%
.title
margin-top : .2rem
line-height : .8rem
background : #eee
text-indent : .2rem
.img
position : relative
overflow : hidden
float :left
width : 50%
height : 0
margin-bottom :21%
.img-content
width : 3.3rem
height : 2.1rem
margin-top :.2rem
margin-left :.2rem
border-radius : .2rem
.img-info
font-size : .23rem
margin-top : .1rem
text-align : center
</style>

问题解决:

最后发现是class的优先级的问题,因为stylus简化了css写法,所以子级别class(被父元素包裹的元素的class)应该在父级别class后严格缩进两格,否则无法识别。

最新文章

  1. SVG坐标系统
  2. poi导出excel
  3. JavaScript内存优化
  4. July 3rd, Week 28th Sunday, 2016
  5. ArcServer JS API开发离线部署方法
  6. cocos2d-x Mask的实现及优化
  7. java23 XML
  8. typedef与define
  9. Nvidia CUDA 6 Installed In Ubuntu 12.04
  10. nodejs 包引用的终极结论
  11. NSObject头文件解析 / 消息机制 / Runtime解读 (一)
  12. 【机器学习】人工神经网络ANN
  13. ZKWeb网页框架2.0正式发布
  14. jacascript 原生选项卡插件
  15. WingIDE 常用快捷键
  16. json数据格式 net.sf.json.JSONException: A JSONObject text must begin with &#39;{&#39; at character 1 of Error:(findColumns1)Read timed out
  17. Chrome多线程下载
  18. Node初识笔记 1第一周
  19. mysql数据库cup飙升处理思路
  20. nginx配置tomcat集群

热门文章

  1. Hello World 之Spring Boot 调用图数据库Neo4j
  2. Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第二十一章:环境光遮蔽(AMBIENT OCCLUSION)
  3. day39-Spring 18-Spring的JDBC模板:查询的操作
  4. 洛谷 P2146 [NOI2015]软件包管理器 树链剖分
  5. 元素的高度(基于vue)
  6. kubernetes1.4新特性:支持Docker新特性
  7. innerHTML属性的内存和性能问题
  8. 【NS2】cygwin+NS2.29安装之道 (转载)
  9. LeetCode80 Remove Duplicates from Sorted Array II
  10. oracle trunc(d1[,c1])