Chellhoooo_abyss


  • Home

  • Archives

  • Categories

[vue&webpck学习笔记] webpack项目的img路径动态绑定

Posted on 2018-03-29 | In 学习笔记 , webpack
背景这是一个由vue-cli+webpack构建的项目,在开发的过程中我需要给<img>动态绑定路径,可是我发现怎么无法解析路径,代码如下1234<div v-for="item in bookList"> <img :src='../assets/'+item.img"> // ……</div> 最后浏览器渲染的结果是这样的,感觉是直接当做字符串处理,而没有对地址进行解析 解决过程 一开始我在想会不会是相对路径写错了,可是当不是动态绑定:src的时候,路径前缀是没有问题的。 然后我把图片放在static/img目录下,并把路径前缀 ...
Read more »

css学习笔记 flex

Posted on 2018-03-28 | In 学习笔记 , css
flex布局内的块状元素和行内元素 display:flex 子元素若为行内元素,将无法设置宽高,需要手动设置display:block/inlinebox display:inline-flex 这是指这是一个行内级的flex包含块,即作用于父包含块而不是子元素。 flex-direction为 row 或 column 的时候 该属性下为row或column是水平居中和垂直居中是相反,即 12345.a{ flex-direction:column; justify-content:center; //水平居中 align-items:center; ...
Read more »

[css学习笔记] inline box & vertical-align

Posted on 2018-03-14 | In 学习笔记 , css
line box & vertical-align下面是文档中一段关于line box的介绍: A line box is always tall enough for all of the boxes it contains. However, it may be taller than the tallest box it contains (if, for example, boxes are aligned so that baselines line up). When the height of a box B is less than the height of the ...
Read more »
1…789…14
chellhoo

chellhoo

42 posts
15 categories
66 tags
© 2018 chellhoo
Powered by Hexo
Theme - NexT.Muse