搭错车的小火柴

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

1.不要手动加减数字算高度间距,有效利用编译器的优势:

<style lang="stylus" scoped>
    headerHeight = 100px
    footerHeight = 200px

    height headerHeight - @padding[0]
    height "calc(100vh - %s - %s)" % (headerHeight footerHeight)

    padding-top 55px;
    height size - @padding-top
</style>

2.

 

posted on 2021-06-03 17:30  搭错车的小火柴  阅读(77)  评论(0编辑  收藏  举报