【问题标题】:how to fix chessboardjs theme not working如何修复chessboardjs主题不起作用
【发布时间】:2021-01-16 16:54:29
【问题描述】:

我知道这很简单,但我的 boardTheme 不起作用?

const startPos = 'start';
const config = {
    draggable: true,
    position: startPos,
    boardTheme: ['#ffffff', '#000000'], // white and black
    onDragStart: onDragStart,
    onDrop: onDrop,
    onSnapEnd: onSnapEnd
}

当我打开网站时,它仍然是默认主题。

【问题讨论】:

    标签: javascript chessboard.js


    【解决方案1】:

    兄弟这个问题是因为你写的代码:-

    boardTheme: ['#ffffff', '#000000']
    

    你知道吗 #ffffff 是白色,#000000 是黑色。

    【讨论】:

    • 那又是什么问题?
    猜你喜欢
    • 2022-06-15
    • 2019-04-17
    • 2020-04-02
    • 2023-03-19
    • 1970-01-01
    • 1970-01-01
    • 2021-12-03
    • 2020-10-24
    • 1970-01-01
    相关资源
    最近更新 更多