xmge
V2EX  ›  微信

微信小程序 vant-Weapp 种折叠面板 custom-class 如何设置呀?请教大神......

  •  
  •   xmge · Jun 16, 2019 · 9421 views
    This topic created in 2597 days ago, the information mentioned may be changed or developed.

    image

    想改下默认配置

    5 replies    2019-06-17 14:00:57 +08:00
    agzou
        1
    agzou  
       Jun 17, 2019
    ```css

    <style lang="scss" scoped>
    .tab {
    background-color: #fafafc;

    > div {
    margin: 10px 0;
    }
    }
    </style>
    <style class="wxss">
    page {
    height: 100%;
    background-color: #fafafc !important;
    }
    </style>
    <style>
    .custom-alone {
    top: 0 !important;
    right: 10px !important;
    }
    </style>
    ```
    xmge
        2
    xmge  
    OP
       Jun 17, 2019
    @agzou 谢谢了,有一点想问下,是直接在 css 文件中写

    ```
    .custom-class {
    background-color:red;
    ....
    ...
    }
    ```

    这样就行吗,我试了好像不行 啊
    agzou
        3
    agzou  
       Jun 17, 2019
    我用的是 mpvue,你直接在 wxss 文件写
    .custom-class{
    background-color:red;
    }
    应该是可以的
    agzou
        4
    agzou  
       Jun 17, 2019
    @xmge 我用的是 mpvue,你直接在 wxss 文件写
    .custom-class{
    background-color:red;
    }
    应该是可以的
    xmge
        5
    xmge  
    OP
       Jun 17, 2019
    @agzou 嗯恩,好的,我晚上回去再试一下,谢谢啦
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2874 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 14:40 · PVG 22:40 · LAX 07:40 · JFK 10:40
    ♥ Do have faith in what you're doing.