vue.js - 如何更改vuesax中侧边栏的背景颜色并使其占据屏幕高度?
问题描述
如何在vuesax中更改侧边栏的背景颜色并使其占据整个屏幕的高度?我阅读了文档,但没有看到有关如何执行此操作的具体示例。
解决方案
首先你需要运行这个命令。(npm i stylus stylus-loader --save-dev)然后在您使用侧边栏的 vue 组件中将以下代码放在脚本标记之后。
<style lang="stylus">
.parentx-static
overflow hidden
height 100%
position fixed
.sidebarx
height 100%
.vs-sidebar.vs-sidebar-staticPosition
background-color #181818
.header-sidebar
background-color: #000000;
margin-left: -5%;
margin-top: -8%;
display flex
align-items center
justify-content center
flex-direction column
width 114%
h4
display flex
align-items center
justify-content center
width 100%
> button
margin-left 10px
.footer-sidebar
display flex
align-items center
justify-content space-between
width 100%
> button
border 0px solid rgba(0,0,0,0) !important
border-left 1px solid rgba(0,0,0,.07) !important
border-radius 0px !important
</style>
如果您包含单独的 css 文件,您也可以将 css 放在单独的文件中。 注意:只接受 RGB 和 HEX 颜色。欲了解更多信息,请参阅下面的链接。 链接: https ://lusaxweb.github.io/vuesax/theme/#colors-defaults
在这里你可以看到一些默认的侧边栏。 https://lusaxweb.github.io/vuesax/components/sideBar.html#default
推荐阅读
- arrays - 来自excel anylogic的三维数组
- mysql - 在 Laravel 中删除外键会导致错误
- azure - 如何在 azure B2C 内置策略中生成具有名字和姓氏的显示名称?
- python - 我有 25 个 .csv 文件(每个文件都是一个抄写员),它们都具有相同的结构(X、Y 和 STATUE)。我想将它们全部合并到一个大的 .txt 文件中
- html - 孩子的`height: 100%;`没有取父母的全高,为什么?
- django - 未创建对象
- mongodb - 大型数据库中与 $nin/$ne 查询相关的性能问题
- python - 如何更新 django 模板中 db 字段的值
- python - Python打印元素发生在下一个元素之后
- docker-compose - 管理员用户在 Rocketchat 中失败