html classlist

原生JS增删查html classlist

const htmlNode = document.getElementsByTagName('html')[0]
const classList = htmlNode.classList

classList.contains('is-clipped')
classList.add('is-clipped')
classList.remove('is-clipped')

最后更新于