Magento 2中的可折叠js是否接受CSS图标内容:“ content:” \ e622“”;?

问题描述 投票:1回答:1

插入内容时出现空白:“ \ e622”;当我输入内容时,我得到加号:“ +”;。

javascript css collapse magento2
1个回答
0
投票

我在集成可折叠小部件时偶然发现了这一点。如果是自定义类,则需要确保已将CSS代码包装在该类周围。这是我的CSS

    .sidebar .outer-box .plus::before {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 13px;
    line-height: inherit;
    color: inherit;
    content: '\e61c';
    font-family: 'icons-blank-theme';
    vertical-align: middle;
    display: inline-block;
    font-weight: normal;
    overflow: hidden;
    speak: none;
    text-align: right;
    position: absolute;
    left: -10px;
}

这是我的.phtml文件中的可折叠HTML代码

<div class="outer-box" data-mage-init='{
    "collapsible":{
        "openedState": "active",
        "animate":{ "duration" :500, "easing":"easeOutCubic"},
        "icons": {"header": "plus", "activeHeader": "minus"}
    }}'>
</div>
© www.soinside.com 2019 - 2024. All rights reserved.